]> gcc.gnu.org Git - gcc.git/blame - gcc/ada/ChangeLog
re PR target/35373 (bootstraping on powerpc with 128bit long double fails with revisi...
[gcc.git] / gcc / ada / ChangeLog
CommitLineData
2f76571e
EB
12008-03-05 Eric Botcazou <ebotcazou@adacore.com>
2
3 PR ada/35186
4 * decl.c (maybe_pad_type): Avoid padding an integral type when
5 bumping its alignment is sufficient.
6
4d0e4612
RW
72008-03-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8
ad6b5b00
RW
9 * gnatfind.adb, gnatxref.adb: Fix argument parsing typos.
10 * s-auxdec-empty.adb, s-auxdec.adb: Fix typos in copyright
11 statement.
12 * a-ngcoar.adb, a-ngrear.adb, g-awk.adb, g-debpoo.adb,
13 gprep.adb, make.adb, makegpr.adb, par-ch6.adb, prj-nmsc.adb,
14 sem_attr.adb, sem_ch4.adb, sem_ch8.adb: Fix typos in ada source
15 code output strings.
16 * sem_type.adb, system-vms-ia64.ads, system-vms.ads,
17 system-vms_64.ads: Fix typos in ada source code comments.
18 * sinfo-cn.adb: Remove incomplete sentence.
19
4d0e4612
RW
20 PR documentation/15479
21 * gnat_rm.texi, gnat_ugn.texi: Avoid standalone `non' word.
22
acf6b7ab
ST
232008-02-27 Samuel Tardieu <sam@rfc1149.net>
24
25 PR ada/22255
26 * s-fileio.adb (Reset): Do not raise Use_Error if mode isn't changed.
27
f5c064ab
ST
282008-02-27 Samuel Tardieu <sam@rfc1149.net>
29
30 PR ada/34799
31 * sem_ch13.adb (Analyze_Record_Representation_Clause): Check
32 that underlying type is present.
33
2d593c86
TT
342008-02-26 Tom Tromey <tromey@redhat.com>
35
36 * misc.c (internal_error_function): Remove test of
37 USE_MAPPED_LOCATION.
38 * trans.c (gigi): Remove test of USE_MAPPED_LOCATION.
39 (Sloc_to_locus): Remove old location code.
40
443b3472
RW
412008-02-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
42
8dd07840
RW
43 * gnat_rm.texi, gnat_ugn.texi: Fix spacing after `e.g.' and
44 `i.e.' by adding comma or `@:' as appropriate.
45 * gnat_rm.texi (Pragma Wide_Character_Encoding): Instead of
46 plain characters `C', use `@samp{C}'.
47 * gnat_ugn.texi (File Naming Rules, About gnatkr)
48 (Krunching Method): Likewise.
49
443b3472
RW
50 * gnat_ugn.texi (Conventions): List environment variables and
51 metasyntactic variables.
52 (Compiling Programs): Fix notation of metasyntactic variables.
53 Add @file where appropriate. Use @file for file extensions,
54 @samp for strings.
55 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, use @samp
56 instead of @file, @env instead of @code.
57
9538dfb9
RW
582008-02-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
59
d488f6ea
RW
60 PR documentation/15479
61 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, replace `..'
62 and `...' with `@dots{}' or `@enddots{}'.
63
1992bbd9
RW
64 PR documentation/15479
65 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, add @command,
66 use @command instead of @code, @option instead of @samp or @code,
67 @code instead of @var, @samp instead of @file.
68
9538dfb9
RW
69 PR documentation/15479
70 * gnat_ugn.texi (Using gnatmake in a Makefile): Do not ignore errors
71 in Makefile rules, by using `&&' rather than `;'.
72
e69044cb
RW
732008-02-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
74
75 PR documentation/15479
76 * gnat_ugn.texi: In non-code, avoid space before colon.
77 (Regular Expressions in gnatfind and gnatxref): Fix indentation.
78 (Examples of gnatxref Usage): Use @command{vi} instead of
79 @file{vi}.
80 (Character Set Control): Do not use @code for UTF-8.
81 (Validity Checking): Fix typo "NaNs" instead of "NaN's". Do not
82 use @code for IEEE.
83 * gnat_rm.texi (Aggregates with static bounds): Fix typo in code
84 sample.
85 * gnat_rm.texi, gnat_ugn.texi: Fix typos. Bump copyright years.
86
6a333ca0
JS
872008-02-11 Joel Sherrill <joel.sherrill@oarcorp.com>
88
89 PR ada/35143
90 * env.c: Add __rtems__ to if defined.
91 * s-osinte-rtems.adb: Add To_Target_Priority. Fix formatting.
92 * s-osinte-rtems.ads: Add To_Target_Priority prototype and
93 PTHREAD_SCOPE_PROCESS/PTHREAD_SCOPE_SYSTEM constants. Add
94 pragma Convention as required.
95 * gsocket.h: Make compile in and out of RTS.
96 * Makefile.in: Add system-rtems.ads. Build DEC extensions.
97 Use g-soccon-rtems.ads.
98 * g-soccon-rtems.ads, system-rtems.ads: New files.
99
72fb133f
KG
1002008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
101
102 PR other/35107
103 * Make-lang.in (gnat1): Add $(GMPLIBS).
104
8fa07a56
EB
1052008-01-26 Eric Botcazou <ebotcazou@adacore.com>
106
107 * decl.c (components_to_record): Improve comment.
108
0bf38239
EB
1092008-01-22 Eric Botcazou <ebotcazou@adacore.com>
110
111 * decl.c (components_to_record): Do not reuse the empty union type
112 if there is a representation clause on the record.
113 * trans.c (addressable_p): Return true for INTEGER_CST.
114
461d6eb3
EB
1152008-01-21 Eric Botcazou <ebotcazou@adacore.com>
116
117 * trans.c (gnat_to_gnu) <N_Free_Statement>: Use POINTER_PLUS_EXPR
118 in pointer arithmetics.
119 * utils2.c (build_allocator): Likewise.
120
9328dd57
EB
1212008-01-17 Eric Botcazou <ebotcazou@adacore.com>
122
123 * utils.c (build_function_stub): Properly build the call expression.
124
052cec9b
EB
1252008-01-14 Eric Botcazou <ebotcazou@adacore.com>
126
127 * decl.c (gnat_to_gnu_entity) <object>: Process renamings
128 before converting the expression to the type of the object.
129 * trans.c (maybe_stabilize_reference) <CONSTRUCTOR>: New case.
130 Stabilize constructors for special wrapping types.
131
08ffbdad
EB
1322008-01-13 Eric Botcazou <ebotcazou@adacore.com>
133
134 * trans.c (call_to_gnu):Invoke the addressable_p predicate only
6bf4cbe8 135 when necessary. Merge some conditional statements. Update comments.
08ffbdad
EB
136 Rename unchecked_convert_p local variable to suppress_type_conversion.
137 Do not suppress conversions in the In case.
138 (addressable_p) <VIEW_CONVERT_EXPR>: Do not take alignment issues
139 into account on non strict-alignment platforms.
140
7219c2c7
EB
1412008-01-12 Eric Botcazou <ebotcazou@adacore.com>
142
143 * utils.c (aggregate_type_contains_array_p): New predicate.
144 (create_field_decl): In a packed record, force byte alignment
145 for fields without specified position that contain an array.
146
52ef2874
EB
1472008-01-12 Eric Botcazou <ebotcazou@adacore.com>
148
149 * utils.c (unchecked_convert): Fold the VIEW_CONVERT_EXPR expression.
150
3fa87ef8
JDA
1512008-01-10 John David Anglin <dave.anglin.@nrc-cnrc.gc.ca>
152
153 PR ada/34466
154 * s-osinte-linux-hppa.ads (SC_NPROCESSORS_ONLN): New constant for
155 sysconf call.
156 (bit_field): New packed boolean type used by cpu_set_t.
157 (cpu_set_t): New type corresponding to the C type with
158 the same name. Note that on the Ada side we use a bit
159 field array for the affinity mask. There is not need
160 for the C macro for setting individual bit.
161 (pthread_setaffinity_np): New imported routine.
162
e0658eda
TK
1632008-01-03 Tero Koskinen <tero.koskinen@iki.fi>
164
165 PR ada/34647
166 * adaint.c (__gnat_open_new_temp, __gnat_tmp_name): Use mkstemp()
167 on OpenBSD as is done on other BSD systems.
168
169 PR ada/34645
170 * sysdep.c (__gnat_ttyname, getc_immediate_nowait,
171 getc_immediate_common): Treat OpenBSD as FreeBSD regarding immediate
172 I/O.
173
174 PR ada/34644
175 * env.c (__gnat_clearenv): Treat OpenBSD as other BSD systems missing
176 clearenv().
177
178 PR ada/34646
179 * init.c (__gnat_error_handler, __gnat_install_handler,
180 __gnat_init_float): Define for OpenBSD.
181
182 * initialize.c (__gnat_initialize): Define for OpenBSD.
183
18bc9cca
ST
1842007-12-27 Samuel Tardieu <sam@rfc1149.net>
185
186 PR ada/34553
187 * adaint.c (__gnat_open_new_temp, __gnat_tmp_name): Use mkstemp()
188 instead of mktemp() or tmpnam() on NetBSD.
189
f0bf503e
EB
1902007-12-23 Eric Botcazou <ebotcazou@adacore.com>
191
192 * trans.c (call_to_gnu): Make the temporary for non-addressable
193 In parameters passed by reference.
194 (addressable_p): Return true for STRING_CST and CALL_EXPR.
195
7469b7bc
AC
1962007-12-19 Robert Dewar <dewar@adacore.com>
197
198 * g-expect-vms.adb, g-expect.adb, s-poosiz.adb:
199 Add pragma Warnings (Off) for unassigned IN OUT arguments
200
201 * sem_warn.adb (Output_Reference): Suppress messages for internal names
202 (Check_References): Extensive changes to tune up warnings
203 (Output_Non_Modifed_In_Out_Warnings): Changes to tune up warnings
204 (Has_Pragma_Unmodifed_Check_Spec): New function
205 (Check_References): Implement pragma Unmodified
206 (Warn_On_Unassigned_Out_Parameter): Implement pragma Unmodified
207
208 * par-prag.adb: Dummy entry for pragma Unmodified
209
210 * sem_prag.adb: Implement pragma Unmodified
211
212 * einfo.ads, einfo.adb: (Has_Pragma_Unmodified): New flag
213 (Proc_Next_Component_Or_Discriminant): Fix typo.
214 Update comments.
215
216 * sem_util.adb (Note_Possible_Modification): Add processinng for pragma
217 Unmodified.
218 (Reset_Analyzed_Flags): Use Traverse_Proc instead of Traverse_Func,
219 because the former already takes care of discarding the result.
220 (Mark_Coextensions): Remove ununused initial value from Is_Dynamic.
221 Add comment.
222
223 * snames.h, snames.ads, snames.adb: Add entry for pragma Unmodified
224
2252007-12-19 Eric Botcazou <ebotcazou@adacore.com>
226
227 * targparm.adb, targparm.ads, system.ads, system-darwin-ppc.ads,
228 system-vxworks-x86.ads, system-linux-ppc.ads, system-linux-hppa.ads,
229 system-hpux-ia64.ads, system-vxworks-arm.ads, system-darwin-x86.ads,
230 system-vms_64.ads, system-vms-ia64.ads, system-linux-ia64.ads,
231 system-freebsd-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
232 system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
233 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
234 system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
235 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
236 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads
237 (Dynamic_Trampolines_Used): Delete.
238
239 * system-lynxos-x86.ads, system-lynxos-ppc.ads: Ditto.
240 Turn on stack probing mechanism on LynxOS.
241
2422007-12-19 Bob Duff <duff@adacore.com>
243
244 * atree.ads, atree.adb (Traverse_Func): Walk Field2 last, and eliminate
245 the resulting tail recursion by hand. This prevents running out of
246 memory on deeply nested concatenations, since Field2 is where the left
247 operand of concatenations is stored.
248 Fix bug (was returning OK_Orig in some cases). Fix return subtype to
249 clarify that it can only return OK or Abandon.
250
251 * sem_res.adb (Resolve_Op_Concat): Replace the recursion on the left
252 operand by iteration, in order to avoid running out of memory on
253 deeply-nested concatenations. Use the Parent pointer to get back up the
254 tree.
255 (Resolve_Op_Concat_Arg, Resolve_Op_Concat_First,
256 Resolve_Op_Concat_Rest): New procedures split out of
257 Resolve_Op_Concat, so the iterative algorithm in Resolve_Op_Concat is
258 clearer.
259
260 * checks.adb (Remove_Checks): Use Traverse_Proc instead of
261 Traverse_Func, because the former already takes care of discarding the
262 result.
263
264 * errout.adb (First_Node): Use Traverse_Proc instead of Traverse_Func,
265 because the former already takes care of discarding the result.
266 (Remove_Warning_Messages): Use appropriate subtype for Status and
267 Discard
268
2692007-12-19 Ed Schonberg <schonberg@adacore.com>
270
271 * exp_aggr.adb (Not_OK_For_Backend): A component of a private type with
272 discriminants forces expansion of the aggregate into assignments.
273 (Init_Record_Controller): If the type of the aggregate is untagged and
274 is not inherently limited, the record controller is not limited either.
275
2762007-12-19 Robert Dewar <dewar@adacore.com>
277
278 * exp_attr.adb (Expand_N_Attribute_Reference, case Size): Fix error in
279 handling compile time known size of record or array (case of front end
280 layout active, e.g. in GNAAMP).
281
2822007-12-19 Javier Miranda <miranda@adacore.com>
283
284 * exp_ch3.adb (Expand_N_Object_Declaration): Complete the circuitry
285 that forces the construction of static dispatch tables in case of
286 record subtypes.
287
2882007-12-19 Robert Dewar <dewar@adacore.com>
289
290 * exp_ch9.adb (Null_Statements): Moved to library level
291 (Trivial_Accept_OK): New function
292 (Expand_Accept_Declaration): Use Trivial_Accept_OK
293 (Expand_N_Accept_Statement): Use Trivial_Accept_OK
294
2952007-12-19 Robert Dewar <dewar@adacore.com>
296
297 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Fix packed array type
298 in complex case where array is Volatile.
299
3002007-12-19 Ed Schonberg <schonberg@adacore.com>
301
302 * freeze.adb (Freeze_Record_Type, Check_Current_Instance): Implement
303 properly the Ada2005 rules concerning when the current instance of a
304 record type is aliased.
305
3062007-12-19 Ed Schonberg <schonberg@adacore.com>
307
308 * par-ch3.adb (P_Record_Declaration): Guard against cascaded errors in
309 mangled declaration
310 (P_Type_Declaration): Diagnose misuse of "abstract" in untagged record
311 declarations.
312 (P_Variant_Part): Cleaner patch for parenthesized discriminant
313
3142007-12-19 Vincent Celier <celier@adacore.com>
315
316 * prj-attr.adb (Package_Node_Id_Of): Returns Unknown_Package when
317 package is not known
318
319 * prj-attr.ads (Unknown_Package): New constant
320 Do not crash when an unknown package is in several projects
321
322 * prj-dect.adb (Parse_Package_Declaration): Mark an unknown package as
323 ignored
324
325 * prj-nmsc.adb (Check): Remove obsolete code related to no longer
326 existing package Language_Processing.
327
3282007-12-19 Ed Schonberg <schonberg@adacore.com>
329 Gary Dismukes <dismukes@adacore.com>
44914a04 330 Samuel Tardieu <sam@rfc1149.net>
7469b7bc
AC
331
332 PR ada/15803, ada/15805
333 * sem_ch6.adb, sem_ch3.adb (Constrain_Access): In Ada2005, diagnose
334 illegal access subtypes when there is a constrained partial view.
335 (Check_For_Premature_Usage): New procedure inside
336 Access_Subprogram_Declaration for checking that an access-to-subprogram
337 type doesn't reference its own name within any formal parameters or
338 result type (including within nested anonymous access types).
339 (Access_Subprogram_Declaration): Add call to Check_For_Premature_Usage.
340 (Sem_Ch3.Analyze_Object_Declaration, Sem_ch6.Process_Formals): if the
341 context is an access_to_variable, the expression cannot be an
342 access_to_constant.
343
3442007-12-19 Bob Duff <duff@adacore.com>
345
346 * sem_ch4.adb (Analyze_Concatenation_Rest): New procedure.
347 (Analyze_Concatenation): Use iteration instead of recursion in order
348 to avoid running out of stack space for deeply nested concatenations.
349
3502007-12-19 Ed Schonberg <schonberg@adacore.com>
351 Gary Dismukes <dismukes@adacore.com>
352
353 * sem_ch8.adb (Analyze_Subprogram_Renaming): Diagnose illegal renamings
354 whose renamed entity is a subprogram that requires overriding.
355 (Premature_Usage): Test for the case of N_Full_Type_Declaration when
356 issuing an error for premature usage and issue a message that says
357 'type' rather than 'object'.
358
3592007-12-19 Gary Dismukes <dismukes@adacore.com>
360
361 PR ada/34149
362 * sem_disp.adb (Check_Dispatching_Call): Augment existing test for
363 presence of a statically tagged operand (Present (Static_Tag)) with
364 test for Indeterm_Ancestor_Call when determining whether to propagate
365 the static tag to tag-indeterminate operands (which forces dispatching
366 on such calls).
367 (Check_Controlling_Formals): Ada2005, access parameters can have
368 defaults.
369 (Add_Dispatching_Operation, Check_Operation_From_Private_View): do
370 not insert subprogram in list of primitive operations if already there.
371
3722007-12-19 Tristan Gingold <gingold@adacore.com>
373
374 * utils.c (create_var_decl_1): call rest_of_decl_compilation only for
375 global variable.
376
3772007-12-19 Thomas Quinot <quinot@adacore.com>
378
379 Part of PR ada/33688
380 * gen-soccon.c: Add constant IP_PKTINFO to allow getting ancillary
381 datagram info on Linux.
382
3832007-12-19 Vincent Celier <celier@adacore.com>
384
385 * makegpr.adb (Check_Compilation_Needed): Normalize C_Source_Path so
386 that the source path name is always found in the dependencies.
387
3882007-12-19 Robert Dewar <dewar@adacore.com>
389
390 * gnat_rm.texi, gnat_ugn.texi: Update documentation of -gnatw.o
391 Fix name of Wide_Wide_Latin_1/9 file names
392 Add documentation for Ada.Exceptions.Last_Chance_Handler (a-elchha.ads)
393 Add missing documentation for Ada.Wide_[Wide_]Characters.Unicode
394 Add missing documentation for Ada.Command_Line.Response_File
395 Update list of warning letters for Warnings pragma
396 Add documentation for pragma Unmodified
397
43779dea
ST
3982007-12-19 Samuel Tardieu <sam@rfc1149.net>
399
400 * Makefile.in: Add s-tasinf.ad[bs] substitutions for sh4-linux target.
401
5287c2bc
AC
4022007-12-17 Arnaud Charlet <charlet@adacore.com>
403
404 * s-vxwork-alpha.ads: Removed, no longer used.
405
6343804d
JJ
4062007-12-15 Jakub Jelinek <jakub@redhat.com>
407
408 * Make-lang.in (gnat1, gnatbind): Pass ALL_CFLAGS on the link line.
409
3958c9c8
ST
4102007-12-13 Samuel Tardieu <sam@rfc1149.net>
411
412 PR ada/34360
413 * Makefile.in: Change two occurrences of mlib-tgt.adb by correct name
414 mlib-tgt-specific.adb.
415
78185974
BD
4162007-12-13 Bob Duff <duff@adacore.com>
417
418 * trans.c (Attribute_to_gnu): Check for violations of the
419 No_Implicit_Dynamic_Code restriction. This checking used to be done in
420 the front end, but is moved here so we can make it more accurate.
421
e9b54d64
AC
4222007-12-13 Pascal Obry <obry@adacore.com>
423
424 * adaint.c (__gnat_pthread_setaffinity_np): New routine. A dummy
425 version is provided for older GNU/Linux distribution not
426 supporting thread affinity sets.
427
428 * s-osinte-linux.ads (SC_NPROCESSORS_ONLN): New constant for sysconf
429 call.
430 (bit_field): New packed boolean type used by cpu_set_t.
431 (cpu_set_t): New type corresponding to the C type with
432 the same name. Note that on the Ada side we use a bit
433 field array for the affinity mask. There is not need
434 for the C macro for setting individual bit.
435 (pthread_setaffinity_np): New imported routine.
436
437 * s-taprop-linux.adb (Enter_Task): Check that the CPU affinity mask is
438 no null.
439 (Create_Task): Set the processor affinity mask if information
440 is present.
441
442 * s-tasinf-linux.ads, s-tasinf-linux.adb: New files.
443
4442007-12-13 Robert Dewar <dewar@adacore.com>
445
446 * s-osinte-lynxos-3.ads, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
447 s-osinte-freebsd.ads, s-osinte-lynxos.ads, s-osinte-tru64.ads,
448 s-osinte-mingw.ads, s-osinte-aix.ads, s-osinte-hpux-dce.ads,
449 s-osinte-irix.ads, s-osinte-solaris.ads, s-intman-vms.adb,
450 s-osinte-vms.ads, s-osinte-vxworks6.ads, s-osinte-vxworks.ads,
451 s-auxdec.ads, s-auxdec-vms_64.ads, s-osinte-darwin.ads,
452 s-taprop-vms.adb, s-interr-sigaction.adb, s-osinte-linux-hppa.ads,
453 i-vxwork-x86.ads, s-tpopde-vms.ads: Add missing pragma Convention C
454 for subprogram pointers.
455
456 * g-ctrl_c.adb: New file.
457
458 * g-ctrl_c.ads (Install_Handler): New body.
459
460 * freeze.adb (Freeze_Subprogram): Use new flag Has_Pragma_Inline_Always
461 instead of obsolete function Is_Always_Inlined.
462 (Freeze_Entity): check for tagged type in imported C subprogram
463 (Freeze_Entity): check for 8-bit boolean in imported C subprogram
464 (Freeze_Entity): check for convention Ada subprogram pointer in
465 imported C subprogram.
466 (Freeze_Fixed_Point_Type): In the case of a base type where the low
467 bound would be chopped off and go from negative to zero, force
468 Loval_Excl_EP to be the same as Loval_Incl_EP (the included lower
469 bound) so that the size computation for the base type will take
470 negative values into account.
471
4722007-12-13 Eric Botcazou <ebotcazou@adacore.com>
473 Bob Duff <duff@adacore.com>
474 Tristan Gingold <gingold@adacore.com>
475
476 * system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
477 system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
478 system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
479 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
480 system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
481 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
482 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
483 system-vxworks-arm.ads, system-darwin-x86.ads, system.ads,
484 system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
485 system-linux-ppc.ads, system-linux-hppa.ads, system-hpux-ia64.ads,
486 system-vms-ia64.ads (Stack_Check_Limits): New target parameter.
487 (Always_Compatible_Rep): New flag to control trampolines globally.
488 (Dynamic_Trampolines_Used): New flag for implementing the
489 No_Implicit_Dynamic_Code restriction more correctly (not yet used,
490 and not yet set correctly for some targets).
491
492 * s-taprop-vxworks.adb: Use stack limit method of stack checking.
493 Simply indirectly call s-stchop when a task is created.
494
495 * ali.ads:
496 New flag added: Stack_Check_Switch_Set which is set when '-fstack-check'
497 appears as an argument (entries A) in an ALI file.
498
499 * fe.h (Stack_Check_Limits): Declare new target parameter.
500 (Check_Implicit_Dynamic_Code_Allowed): New procedure.
501
502 * init.c: Declare __gnat_set_stack_limit_hook for VxWorks kernel RTS.
503 This variable is declared in C to be sure not subject to elaboration
504 code.
505 (__gnat_map_signal, VxWorks): In kernel mode, map SIGILL to
506 Storage_Error.
507
508 * targparm.ads, targparm.adb (Stack_Check_Limits): New parameter.
509 (Always_Compatible_Rep, Dynamic_Trampolines_Used): New parameters.
510
511 * s-stchop.ads: Add comments.
512
513 * s-stchop-vxworks.adb: Package almost fully rewritten to use stack
514 limit method of stack checking.
515
516 * s-stchop-limit.ads: New file.
517
5182007-12-13 Robert Dewar <dewar@adacore.com>
519
520 * sem_ch5.adb, s-taskin.adb, a-ciorma.adb, a-coorma.adb, a-cohama.adb,
521 a-cihama.adb, g-awk.adb,
522 s-inmaop-posix.adb: Update handling of assigned value/unreferenced
523 warnings
524
525 * exp_smem.adb: Update handling of assigned value/unreferenced warnings
526
527 * sem.adb: Update handling of assigned value/unreferenced warnings
528
529 * a-exexpr-gcc.adb: Add a pragma warnings off for boolean return
530
531 * lib-xref.ads: Improve documentation for k xref type
532
533 * lib-xref.adb:
534 Update handling of assigned value/unreferenced warnings
535 (Generate_Reference): Warning for reference to entity for which a
536 pragma Unreferenced has been given should be unconditional.
537 If the entity is a discriminal, mark the original
538 discriminant as referenced.
539
540 * sem_warn.ads, sem_warn.adb
541 (Check_One_Unit): Test Renamed_In_Spec to control giving warning for
542 no entities referenced in package
543 (Check_One_Unit): Don't give message about no entities referenced in
544 a package if a pragma Unreferenced has appeared.
545 Handle new warning flag -gnatw.a/-gnatw.A
546 Update handling of assigned value/unreferenced warnings
547
548 * atree.h: Add flags up to Flag247
549 (Flag231): New macro.
550
5512007-12-13 Jose Ruiz <ruiz@adacore.com>
552
553 * adaint.h: (__gnat_plist_init): Not defined for RTX.
554
555 * initialize.c (__gnat_initialize): Do not call __gnat_plist_init for
556 RTX systems.
557
558 * Makefile.in: Add new files s-tasinf-linux.ads and s-tasinf-linux.adb.
559 (LIBGNAT_TARGET_PAIRS, MISCLIB, THREADSLIB,
560 EXTRA_GNATRTL_NONTASKING_OBJS, EXTRA_GNATRTL_TASKING_OBJS,
561 GNATLIB_SHARED for RTX run time): Use the versions required by RTX.
562
563 * mingw32.h:
564 Do not define GNAT_UNICODE_SUPPORT for RTX since it is not supported.
565
566 * sysdep.c (winflush_function for RTX): Procedure that does nothing
567 since we only have problems with Windows 95/98, which are not
568 supported by RTX.
569 (__gnat_ttyname): Return the empty string on Nucleus, just as
570 done on vxworks.
571
5722007-12-13 Robert Dewar <dewar@adacore.com>
573
574 * a-textio.adb, a-textio.ads:
575 Extensive changes to private part for wide character encoding
576
577 * a-witeio.adb, a-witeio.ads, a-ztexio.ads, a-ztexio.adb
578 (Look_Ahead): Fix mishandling of encoded sequences
579 Move declaration of Wch_Con to private part (should not be visible)
580
581 * ali.adb (Scan_ALI): Set default encoding method to brackets instead of
582 UTF-8. Probably this is never used, but if it is, brackets is
583 clearly correct.
584
585 * bindgen.adb (Get_WC_Encoding): New procedure to properly handle
586 setting wide character encoding for no main program case and when
587 encoding is specified using -W?
588 Initialize stack limit of environment task if stack limit method of
589 stack checking is enabled.
590 (Gen_Adainit_Ada): Use Get_WC_Encoding to output encoding method
591 (Gen_Adainit_C): Use Get_WC_Encoding to output encoding method
592 (Get_Main_Unit_Name): New function.
593 (Gen_Adainit_Ada): Add call to main program for .NET when needed.
594 (Gen_Output_File): Set Bind_Main_Program to True for .NET
595
596 * bindusg.adb: Add line for -Wx switch
597
598 * s-wchcon.adb, s-wchcon.ads: (Is_Start_Of_Encoding): New function
599 Add comments
600 Add new useful constant WC_Longest_Sequences
601
602 * switch-b.adb: Clean up handling of -Wx switch
603 For -gnatWx, set Wide_Character_Encoding_Method_Specified
604
605 * switch-c.adb: -gnatg activates warning on assertion errors
606 For -gnatWx, set Wide_Character_Encoding_Method_Specified
607
608 * s-wchcon.adb: (Is_Start_Of_Encoding): New function
609
6102007-12-13 Robert Dewar <dewar@adacore.com>
611 Ed Schonberg <schonberg@adacore.com>
612
613 * a-ngcoty.adb: New pragma Fast_Math
614
615 * opt.adb: New pragma Fast_Math
616
617 * par-prag.adb:
618 Add Implemented_By_Entry to the list of pragmas which do not require any
619 special processing.
620 (Favor_Top_Level): New pragma.
621 New pragma Fast_Math
622
623 * exp_attr.adb: Move Wide_[Wide_]Image routines to Exp_Imgv
624 (Expand_N_Attribute_Reference, Displace_Allocator_Pointer,
625 Expand_Allocator_Expression): Take into account VM_Target
626 (Expand_Attribute, case 'Identity): Handle properly the case where
627 the prefix is a task interface.
628 New pragma Fast_Math
629
630 * par.adb (Next_Token_Is): New function
631 (P_Pragma): Add Skipping parameter
632 (U_Left_Paren): New procedure
633 (U_Right_Paren): New procedure
634 New pragma Fast_Math
635
636 * par-ch10.adb (P_Subunit): Unconditional msg for missing ) after
637 subunit
638 New pragma Fast_Math
639
640 * sem_prag.adb: Add significance value to table Sig_Flag for pragma
641 Implemented_By_Entry.
642 (Analyze_Pragma): Add case for Ada 2005 pragma Implemented_By_Entry.
643 (Set_Inline_Flags): Do not try to link pragma Inline onto chain of rep
644 items, since it can apply to more than one overloadable entity. Set
645 new flag Has_Pragma_Inline_Always for Inline_Always case.
646 (Analyze_Pragma, case Complex_Representation): Improve error message.
647 (Analyze_Pragma, case Assert): When assertions are disabled build the
648 rewritten code with Sloc of expression rather than pragma, so new
649 warning about failing is not deleted.
650 (Analyze_Pragma): Allow pragma Preelaborable_Initialization to apply to
651 protected types and update error message to reflect that. Test whether
652 the protected type is allowed for the pragma (an error is issued if the
653 type has any entries, or components that do not have preelaborable
654 initialization).
655 New pragma Fast_Math
656 (Analyze_Pragma, case No_Return): Handle generic instance
657
658 * snames.h, snames.ads, snames.adb:
659 Add new predefined name for interface primitive _Disp_Requeue.
660 New pragma Fast_Math
661
662 * a-tags.ads, a-tags.adb: New calling sequence for
663 String_To_Wide_[Wide_]String
664 (Secondary_Tag): New subprogram.
665
666 * exp_imgv.ads, exp_imgv.adb: Move Wide_[Wide_]Image routines here
667 from Exp_Attr
668 New calling sequence for String_To_Wide_[Wide_]String
669 (Expand_Image_Attribute): Major rewrite. New calling sequence avoids
670 the use of the secondary stack for image routines.
671
672 * a-except-2005.adb, s-wchstw.ads, s-wchstw.adb, s-wwdenu.adb: New
673 calling sequence for String_To_Wide_[Wide_]String
674
675 * par-ch3.adb (P_Declarative_Items): Recognize use of Overriding in
676 Ada 95 mode
677 (P_Unknown_Discriminant_Part_Opt): Handle missing parens gracefully
678 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
679
680 * par-ch6.adb (P_Subprogram): Recognize use of Overriding in Ada 95 mode
681 (P_Formal_Part): Use Skipping parameter in P_Pragma call
682 to improve error recovery
683
684 * par-util.adb (Next_Token_Is): New function
685 (Signal_Bad_Attribute): Use new Namet.Is_Bad_Spelling_Of function
686
687 * par-ch2.adb (Skip_Pragma_Semicolon): Do not resynchronize to
688 semicolon if missing
689 (P_Pragma): Implement new Skipping parameter
690 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
691 Fix location of flag for unrecognized pragma message
692
693 * par-tchk.adb (U_Left_Paren): New procedure
694 (U_Right_Paren): New procedure
695
6962007-12-13 Geert Bosch <bosch@adacore.com>
697
698 * a-tifiio.adb:
699 (Put_Int64): Use Put_Digit to advance Pos. This fixes a case where
700 the second or later Scaled_Divide would omit leading zeroes,
701 resulting in too few digits produced and a Layout_Error as result.
702 (Put): Initialize Pos.
703
7042007-12-13 Robert Dewar <dewar@adacore.com>
705
706 atree.ads, atree.adb (Flag231..Flag247): New functions
707 (Set_Flag231..Set_Flag247): New procedures
708 (Basic_Set_Convention): Rename Set_Convention to be
709 Basic_Set_Convention
710 (Nkind_In): New functions
711 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
712
713 * exp_ch6.adb (Expand_Call): Use new flag Has_Pragma_Inline_Always
714 instead
715 of obsolete function Is_Always_Inlined
716 (Register_Predefined_DT_Entry): Initialize slots of the second
717 secondary dispatch table.
718 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
719 (Expand_N_Function_Call): Remove special provision for stack checking.
720
721 * exp_util.ads, exp_util.adb (Is_Predefined_Dispatching_Operation):
722 Include _Disp_Requeue in the list of predefined operations.
723 (Find_Interface_ADT): Modified to fulfill the new specification.
724 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
725
726 * par-ch4.adb, nlists.ads, nlists.adb:
727 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
728
729 * sinfo.ads, sinfo.adb: (Nkind_In): New functions
730 Fix location of flag for unrecognized pragma message
731
732 * sem_ch7.adb: Use Nkind_In
733
7342007-12-13 Vincent Celier <celier@adacore.com>
735
736 * opt.ads:
737 Indicate what flags are used by the Project Manager, gprbuild and
738 gprclean.
739 (Opt.Follow_Links_For_Dirs): New flag
740 (Warn_On_Assertion_Failure): New flag
741 (Wide_Character_Encoding_Method_Specified): New flag
742 (Suppress_All_Inlining): New switch set by -fno-inline
743 (Real_VMS_Target): New flag
744 New pragma Fast_Math
745
7462007-12-13 Robert Dewar <dewar@adacore.com>
747
748 * back_end.adb: Recognize -fno-inline
749
7502007-12-13 Robert Dewar <dewar@adacore.com>
751
752 * checks.adb: Fix optimization problem with short-circuited form
753
7542007-12-13 Bob Duff <duff@adacore.com>
755
756 * clean.adb (Usage): Add line for -aP
757 (Check_Version_And_Help): Change Check_Version_And_Help to be generic,
758 with a parameter "procedure Usage", instead of passing a pointer to a
759 procedure. This is to eliminate trampolines (since the Usage procedure
760 is often nested in a main procedure, and it would be inconvenient to
761 unnest it).
762
763 * g-comlin.adb (For_Each_Simple_Switch): Change For_Each_Simple_Switch
764 to be generic, with a parameter "procedure Callback (...)", instead of
765 passing a pointer to a procedure. This is to eliminate trampolines
766 (since the Callback procedure is usually nested).
767
768 * gnatfind.adb, switch.adb, switch.ads, gnatlink.adb, gnatls.adb,
769 gnatname.adb, gnatxref.adb, gnatchop.adb, gprep.adb, gnatbind.adb
770 (Check_Version_And_Help): Change Check_Version_And_Help to be generic.
771
772 * g-pehage.adb (Compute_Edges_And_Vertices, Build_Identical_Key_Sets):
773 Use the generic Heap_Sort_G instead of Heap_Sort_A.
774
7752007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
776
777 * einfo.ads, einfo.adb: Flag 232 is now Implemented_By_Entry.
778 (Implemented_By_Entry, Set_Implemented_By_Entry): New routines.
779 (Write_Entry_Flags): Add an entry for Implemented_By_Entry.
780 (Renamed_In_Spec): New flag
781 (Has_Pragma_Inline_Always): New flag
782 Add missing doc for pragma Obsolescent_Warning
783 Add missing doc for 17 additional unused flags (230-247)
784 (Is_Derived_Type): Remove condition "not Is_Generic_Type".
785 Alphabetize with clauses.
786 Separate Is_Thunk and Has_Thunks flags
787 (Write_Entity_Flags): Add forgotten entry for Has_Thunks
788 (Related_Interface): Renamed to Related_Type.
789 (Has_Thunks/Set_Has_Thunks): Subprograms of new attribute.
790 (Set_Is_Flag): Restrict the assertion.
791
7922007-12-13 Vincent Celier <celier@adacore.com>
793
794 * errout.adb (Output_Source_Line): Do not keep a trailing space after
795 the source line number if the source line is empty.
796
7972007-12-13 Geert Bosch <bosch@adacore.com>
798
799 * eval_fat.adb (Decompose_Int): Handle argument of zero.
800 (Compose): Remove special casing of zero.
801 (Exponent): Likewise.
802 (Fraction): Likewise.
803 (Machine): Likewise.
804 (Decompose): Update comment.
805
8062007-12-13 Ed Schonberg <schonberg@adacore.com>
807
808 * exp_aggr.adb (Build_Record_Aggr_Code): If there is an aggregate for a
809 limited ancestor part, initialize controllers of enclosing record
810 before expanding ancestor aggregate.
811 (Gen_Assign): If a component of the aggregate is box-initialized, add
812 code to call Initialize if the component is controlled, and explicit
813 assignment of null if the component is an access type.
814
815 Handle properly aggregates for limited types that appear in object
816 declarations when the aggregate contains controlled values such as
817 protected types.
818 When expanding limited aggregates into individual components, do not
819 call Adjust on controlled components that are limited.
820
8212007-12-13 Ed Schonberg <schonberg@adacore.com>
822
823 * expander.adb: Take into account N_Subprogram_Renaming_Declaration
824
8252007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
826
827 * exp_ch3.adb (Predefined_Primitive_Bodies): Generate the body of
828 predefined primitive _Disp_Requeue.
829 (Make_Predefined_Primitive_Specs): Create the spec for predefined
830 primitive _Disp_Requeue.
831 (Make_Predefined_Primitive_Specs/Predefined_Primitive_Bodies): Set the
832 type of formal Renamed_Eq to Entity_Id (instead of Node_Id).
833 (Make_Predefined_Primitive_Specs): Spec of "=" needed if the parent is
834 an interface type. In case of limited interfaces we now declare all the
835 predefined primitives associated with synchronized interfaces as
836 abstract.
837 (Predef_Spec_Or_Body): For interface types generate abstract subprogram
838 declarations.
839 (Predefined_Primitive_Bodies): Add body of "=" if the parent of the
840 tagged type is an interface type and there is no user-defined equality
841 function.
842 Add also bodies of predefined primitives associated with synchronized
843 interfaces.
844 (Freeze_Record_Type): Do not build bodies of predefined primitives of
845 interface types because they are now defined abstract.
846 Add missing documentation.
847 (Expand_Record_Controller): Update occurrence of Related_Interface
848 to Related_Type.
849 (Build_Offset_To_Top_Functions): Do nothing in case of VM.
850 (Expand_N_Object_Declaration): Take into account VM_Target when handling
851 class wide interface object declaration.
852 (Expand_Previous_Access_Type): Do not create a duplicate master entity
853 if the access type already has one.
854 (Expand_N_Object_Declaration): Defend against attempt to validity check
855 generic types. Noticed for -gnatVcf specified with previous errors.
856
8572007-12-13 Arnaud Charlet <charlet@adacore.com>
858
859 * exp_ch4.adb (Expand_N_Attribute_Reference, Displace_Allocator_Pointer,
860 Expand_Allocator_Expression): Take into account VM_Target
861
862 * exp_ch5.adb (Expand_N_Extended_Return_Statement): Do not use
863 secondary stack when VM_Target /= No_VM
864
8652007-12-13 Javier Miranda <miranda@adacore.com>
866 Ed Schonberg <schonberg@adacore.com>
867
868 * exp_ch7.adb (Expand_N_Package_Body): Replace occurrence of attribute
869 Is_Complation_Unit by Is_Library_Level_Entity in the code
870 that decides if the static dispatch tables need to be built.
871 (Wrap_Transient_Declaration): Do not generate a finalization call if
872 this is a renaming declaration and the renamed object is a component
873 of a controlled type.
874
8752007-12-13 Gary Dismukes <dismukes@adacore.com>
876
877 * exp_ch8.ads, exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration):
878 In the case where the renamed subprogram is a dereference, call
879 Force_Evaluation on the prefix.
880
8812007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
882 Ed Schonberg <schonberg@adacore.com>
883
884 * exp_ch9.adb (Expand_N_Asynchronous_Select,
885 Expand_N_Conditional_Entry_Call, Expand_N_Timed_Entry_Call): Code and
886 comment reformatting.
887 (Set_Privals): Inherit aliased flag from formal. From code reading.
888 (Build_Simple_Entry_Call): Out parameters of an access type are passed
889 by copy and initialized from the actual. This includes entry parameters.
890 (Expand_N_Requeue_Statement): Reimplement in order to handle both Ada 95
891 and Ada 2005 models of requeue.
892 (Null_Statements): Still connsider do-end block null if it contains
893 Unreferenced and Warnings pragmas.
894 (Expand_N_Accept_Statement): Do not optimize away null do end if
895 dispatching policy is other than defaulted.
896 (Expand_N_Timed_Entry_Call): When the triggering statement is a
897 dispatching call, manually analyze the delay statement.
898 (Find_Parameter_Type): Move subprogram to Sem_Util.
899
9002007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
901 Javier Miranda <miranda@adacore.com>
902
903 * exp_disp.ads, exp_disp.adb (Default_Prim_Op_Position): Primitive
904 _Disp_Requeue occupies dispatch table slot number 15. Move
905 _Disp_Timed_Select to slot 16.
906 (Make_Disp_Requeue_Body, Make_Disp_Requeue_Spec): New routines which
907 generate the spec and body of _Disp_Reqeueue.
908 (Make_DT): Build and initialize the second dispatch table.
909 Handle initialization of RC_Offset when the parent
910 is a private type with variable size components.
911 (Make_Secondary_DT): Complete documentation. Add support to
912 initialize the second dispatch table.
913 (Make_Tags): Generate the tag of the second dispatch table.
914 (Register_Primitive): Add support to register primitives in the
915 second dispatch table.
916
9172007-12-13 Pascal Obry <obry@adacore.com>
918
919 * expect.c (__gnat_kill) [WIN32]: Implement the SIGINT signal on
920 Windows. This signal is used by gnatmake to kill child processes for
921 example.
922
9232007-12-13 Javier Miranda <miranda@adacore.com>
924
925 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Add missing
926 support for generic dispatching constructor calls in which we need to
927 locate the tag of a secondary dispatch table associated with an
928 interface type to properly dispatch the call.
929 (Expand_N_Attribute_Reference [case Address],
930 Expand_Dispatching_Constructor_Call, Expand_Unc_Deallocation): Fix
931 handling of VM targets.
932
9332007-12-13 Robert Dewar <dewar@adacore.com>
934 Ed Schonberg <schonberg@adacore.com>
935
936 * exp_prag.adb (Expand_Pragma_Assert): Recognize new warning flag for
937 assert fail
938
939 * ug_words: Add entries for -gnatw.a -gnatw.A
940
941 * sem_res.adb (Set_String_Literal_Subtype): If the context of the
942 literal is a subtype with non-static constraints, use the base type of
943 the context as the base of the string subtype, to prevent type
944 mismatches in gigi.
945 (Resolve_Actuals): If the actual is an entity name, generate a
946 reference before the actual is resolved and expanded, to prevent
947 spurious warnings on formals of enclosing protected operations.
948 (Analyze_Overloaded_Selected_Component): If type of prefix if
949 class-wide, use visible components of base type.
950 (Resolve_Selected_Component): Ditto.
951 (Resolve_Short_Circuit): Detect case of pragma Assert argument
952 evaluating to False, and issue warning message.
953
954 * usage.adb: Add lines for -gnatw.a and -gnatw.A
955
9562007-12-13 Emmanuel Briot <briot@adacore.com>
957
958 * g-calend.ads (No_Time): New constant, to represent an uninitialized
959 time value
960
961 * g-catiio.ads, g-catiio.adb (Value): Added support for more date
962 formats.
963 (Month_Name_To_Number): New subprogram
964
965 * g-dirope.adb (Get_Current_Dir): On windows, normalize the drive
966 letter to upper-case.
967
9682007-12-13 Robert Dewar <dewar@adacore.com>
969 Ed Schonberg <schonberg@adacore.com>
970
971 * gnat1drv.adb (Gnat1drv): Properly set new flag Opt.Real_VMS_Target
972
973 * layout.adb (Resolve_Attribute, case 'Access): If designated type of
974 context is a limited view, use non-limited view when available. If the
975 non-limited view is an unconstrained array, this enforces consistency
976 requirements in 3.10.2 (27).
977 (Layout_Type): For an access type whose designated type is a limited
978 view, examine its declaration to determine if it is an unconstrained
979 array, and size the access type accordingly.
980 (Layout_Type): Do not force 32-bits for convention c subprogram
981 pointers in -gnatdm mode, only if real vms target.
982
983 * sem_attr.adb (Analyze_Access_Attribute): Use new flag
984 Has_Pragma_Inline_Always instead of obsolete function Is_Always_Inlined
985 (Analyze_Access_Attribute,Attribute_Address): Remove checks for
986 violations of the No_Implicit_Dynamic_Code restriction.
987 (Resolve_Attribute, case 'Access): If designated type of context is a
988 limited view, use non-limited view when available. If the non-limited
989 view is an unconstrained array, this enforces consistency requirements
990 in 3.10.2 (27).
991 (Layout_Type): For an access type whose designated type is a limited
992 view, examine its declaration to determine if it is an unconstrained
993 array, and size the access type accordingly.
994
9952007-12-13 Vincent Celier <celier@adacore.com>
996
997 * gnatcmd.adb (GNATCmd): Do not issue -d= switch to gnatmetric when
998 object directory of main project does not exist.
999 On VMS, correctly set then environment variable for the source
1000 directories.
1001
10022007-12-13 Vasiliy Fofanov <fofanov@adacore.com>
1003
1004 * g-regist.ads, g-regist.adb (Set_Value): new parameter Expand; when
1005 set to True this procedure will create the value of type REG_EXPAND_SZ.
1006 It was only possible to create REG_SZ values before.
1007
10082007-12-13 Robert Dewar <dewar@adacore.com>
1009
1010 * g-spchge.ads, g-spchge.adb, g-u3spch.adb, g-u3spch.ads,
1011 g-wispch.adb, g-wispch.ads, g-zspche.adb, g-zspche.ads,
1012 namet-sp.adb, namet-sp.ads: New files.
1013
1014 * g-speche.adb: Use generic routine in g-spchge
1015
1016 * s-wchcnv.ads, s-wchcnv.adb:
1017 Minor code cleanup (make formal type consistent with spec)
1018
1019 * namet.adb: Update comments.
1020
1021 * par-endh.adb (Evaluate_End_Entry): Use new
1022 Namet.Sp.Is_Bad_Spelling_Of function
1023
1024 * par-load.adb (Load): Use new Namet.Sp.Is_Bad_Spelling_Of function
1025
1026 * sem_aggr.adb (Resolve_Record_Aggregate): If a component of an
1027 ancestor is an access type initialized with a box, set its type
1028 explicitly, for use in subsequent expansion.
1029 (Check_Misspelled_Component): Use new Namet.Sp.Is_Bad_Spelling_Of
1030 function
1031
10322007-12-13 Robert Dewar <dewar@adacore.com>
1033
1034 * g-spipat.adb (Break): Fix accessibility error (vsn taking not null
1035 access Vstring)
1036
10372007-12-13 Robert Dewar <dewar@adacore.com>
1038
1039 * inline.adb (Back_End_Cannot_Inline): Use new flag
1040 Has_Pragma_Inline_Always instead of obsolete function Is_Always_Inlined
1041
1042 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Use new flag
1043 Has_Pragma_Inline_Always instead.
1044 of obsolete function Is_Always_Inlined
1045 (Build_Body_To_Inline): Same change
1046 (Cannot_Inline): Same change
1047 Do not give warning on exception raise in No_Return function
1048
1049 * sem_ch13.adb (Analyze_Record_Representation_Clause): If an inherited
1050 component has two inconsistent component clauses in the same record
1051 representation clause, favor the message that complains about
1052 duplication rather than inconsistency.
1053 Update comments.
1054 (Record_Representation_Clause): Do not warn on missing component
1055 clauses for inherited components of a type extension.
1056 (Rep_Item_Too_Late): Do not attempt to link pragma into rep chain for
1057 an overloadable item if it is a pragma that can apply to multiple
1058 overloadable entities (e.g. Inline) because a pragma cannot be on
1059 more than one chain at a time.
1060 (Validate_Unchecked_Conversion): Add code to warn on unchecked
1061 conversion where one of the operands is Ada.Calendar.Time.
1062 (Analyze_Attribute_Definition_Clause): Fix typo in error message.
1063 For now, ignore Component_Size clause on VM targets, as done for
1064 pragma Pack.
1065
10662007-12-13 Emmanuel Briot <briot@adacore.com>
1067 Vincent Celier <celier@adacore.com>
1068
1069 * prj.ads, prj.adb (Is_A_Language): Now takes a Name_Id instead of a
1070 string
1071 (Must_Check_Configuration, Default_Language_Is_Ada): new flags in
1072 prj.ads
1073 (Hash): Move instantiation of System.HTable.Hash from spec to body
1074 (prj-nmsc.adb): Optimize calls to Name_Find when on case sensitive
1075 systems, since we do not need to recompute the Name_Id for the canonical
1076 file name.
1077 (Body_Suffix_Id_Of, Spec_Suffix_Id_Of): new version that takes a name_id
1078 as a parameter. This parameter is in fact always "ada" in all calls, and
1079 we were doing 160560 extra calls to Name_Find to convert it to Name_Ada
1080 while loading a project with 40000 files
1081
1082 * prj-attr.adb: Fix name of attribute Dependency_Driver
1083 Change the kind of indexing for attribute Root
1084
1085 * prj-dect.adb (Parse_Declarative_Items): Allow redeclarations of
1086 variables already declared, in case constructions.
1087
1088 * prj-env.adb (Initialize): Reset Current_Source_Path_File and
1089 Current_Object_Path_File to No_Path.
1090
1091 * prj-ext.adb (Initialize_Project_Path): In multi language mode, use
1092 ADA_PROJECT_PATH if value of GPR_PROJECT_PATH is empty.
1093
1094 * prj-makr.adb: new parameter Current_Dir
1095
1096 * prj-nmsc.ads, prj-nmsc.adb (Find_Explicit_Sources): Do not look for
1097 Ada sources when language is not Ada.
1098 Change Opt.Follow_Links to Opt.Follow_Links_For_Files.
1099 (Find_Excluded_Sources, Find_Explicit_Sources): new subprograms
1100 (Must_Check_Configuration, Default_Language_Is_Ada): new flags.
1101 (Locate_Directory): Always resolve links when computing Canonical_Path
1102 (Look_For_Sources): Make sure that Name_Buffer contains the file name
1103 in Source_Files before checking for the presence of a directory
1104 separator.
1105 Optimize calls to Name_Find when on case sensitive systems.
1106 (Body_Suffix_Id_Of, Spec_Suffix_Id_Of): new version that takes a name_id
1107 as a parameter.
1108 (Prj.Nmsc.Check): new parameter Current_Dir
1109 (Check_Ada_Naming_Schemes): Restrictions on suffixes are relaxed. They
1110 cannot be empty and the spec suffix cannot be the same as the body or
1111 separate suffix.
1112 (Get_Unit): When a file name can be of several unit kinds (spec, body or
1113 subunit), always consider the longest suffix.
1114 (Check_Configuration): Do not issue an error if there is no compiler
1115 for a language. Just issue a warning and ignore the sources for the
1116 language.
1117 (Check_Library_Attributes): Only check Library_Dir if Library_Name is
1118 not empty.
1119 (Check_Naming_Schemes.Maked_Unit): Only output message if high verbosity
1120 (Unit_Exceptions): New hash table
1121 (Check_Naming_Schemes): Check if a file that could be a unit because of
1122 the naming scheme is not in fact a source because there is an exception
1123 for the unit.
1124 (Look_For_Sources): Put the unit exceptions in hash table
1125 Unit_Exceptions
1126 (Get_Unit_Exceptions): Give initial value No_Source to local variable
1127 Other_Part to avoid exception when code is compiled with validity
1128 checking.
1129 (Get_Sources_From_File): Check that there is no directory information
1130 in the file names.
1131 (Look_For_Sources): Check that there is no directory information in the
1132 list of file names in Source_Files.
1133 (Look_For_Sources): In multi-language mode, do not allow exception file
1134 names that are excluded.
1135 (Excluded_Sources_Htable): New hash table
1136 (Search_Directories.Check_File): New procedure to simplify
1137 Search_Directories.
1138 (Search_Directories): Do not consider excluded sources
1139 (Look_For_Sources): Populate Excluded_Sources_Htable before calling
1140 Search_Directories.
1141 (Get_Exceptions): Set component Lang_Kind of Source_Data
1142 (Get_Unit_Exceptions): Ditto
1143 (Search_Directories): Ditto
1144
1145 * prj-pars.adb: new parameter Current_Dir
1146
1147 * prj-part.ads, prj-part.adb:
1148 Change Opt.Follow_Links to Opt.Follow_Links_For_Files.
1149 (Opt.Follow_Links_For_Dirs): New flag
1150 (Project_Path_Name_Of): Cache information returned by this routine as
1151 Locate_Regular_File is a costly routine. The code to output a log
1152 information and the effective call to Locate_Regular_File is now
1153 factorized into a routine (code clean-up).
1154 (Parse, Parse_Single_Project): new parameter Current_Dir
1155 When main project file cannot be found, indicate in the error
1156 message the project path that was used to do the search.
1157
1158 * prj-proc.ads, prj-proc.adb (Opt.Follow_Links_For_Dirs): New flag
1159 (Prj.Proc.Process*): new parameter Current_Dir
1160
1161 * switch-m.adb: Change Opt.Follow_Links to Opt.Follow_Links_For_Files
1162
11632007-12-13 Bob Duff <duff@adacore.com>
1164
1165 * restrict.ads, restrict.adb (Check_Implicit_Dynamic_Code_Allowed): New
1166 procedure to be called from the back end to check the
1167 No_Implicit_Dynamic_Code restriction.
1168
11692007-12-13 Arnaud Charlet <charlet@adacore.com>
1170
1171 * rtsfind.adb (Check_CRT): Take into account RTE_Available_Call
1172 Fixes another case where RTE_Available_Call was ignored instead of being
1173 taken into account.
1174 (Load_Fail): Ditto.
1175
1176 * rtsfind.ads: Add new entries.
1177
11782007-12-13 Robert Dewar <dewar@adacore.com>
1179
1180 * g-byorma.adb, g-byorma.ads, g-decstr.adb, g-decstr.ads,
1181 g-deutst.ads, g-encstr.adb, g-encstr.ads, g-enutst.ads: New files.
1182
1183 * scn.adb: Implement BOM recognition
1184
11852007-12-13 Thomas Quinot <quinot@adacore.com>
1186 Ed Schonberg <schonberg@adacore.com>
1187
1188 * sem_ch10.adb (Check_Private_Child_Unit): A non-private library level
1189 subprogram body that acts as its own spec may not have a non-private
1190 WITH clause on a private sibling.
1191 (Build_Unit_Name): If the parent unit in the name in a with_clause on a
1192 child unit is a renaming, create an implicit with_clause on that
1193 parent, and not on the unit it renames, to prevent visibility errors
1194 in the current unit.
1195
11962007-12-13 Ed Schonberg <schonberg@adacore.com>
1197
1198 * sem_ch12.adb (Instantiate_Formal_Subprogram): In the subprogram
1199 renaming declaration, use the Slocs of the formal parameters from the
1200 declaration of the formal subprogram when creating the formal parameter
1201 entities in the renaming declaration.
1202 (Analyze_Formal_Type_Declaration): Change the placement of the error
1203 message concerning illegal known discriminants. It is now posted on the
1204 type rather than on the first discriminant. This change ensures early
1205 error report.
1206 (Freeze_Subprogram_Body): If the generic subprogram is nested within
1207 the package body that contains the instance, do not generate an
1208 out-of-place freeze node for the enclosing package.
1209 (Collect_Previous_Instantiations): Ignore internal instantiations
1210 generated for formal packages.
1211 (Validate_Derived_Type_Instance): Add a check that when a formal
1212 derived type is Known_To_Have_Preelab_Init then the actual type must
1213 have preelaborable initialization, and issue an error when this
1214 condition is violated.
1215
12162007-12-13 Robert Dewar <dewar@adacore.com>
1217
1218 * s-imenne.adb, s-imenne.ads: New files.
1219
1220 * s-imgboo.adb, s-imgboo.ads, s-imgcha.adb, s-imgcha.ads, s-imgdec.adb,
1221 s-imgdec.ads, s-imgenu.ads, s-imgint.adb, s-imgint.ads, s-imglld.adb,
1222 s-imglld.ads, s-imglli.adb, s-imglli.ads, s-imgllu.adb, s-imgllu.ads,
1223 s-imgrea.adb, s-imgrea.ads, s-imguns.adb, s-imguns.ads, s-imgwch.adb,
1224 s-imgwch.ads: New calling sequence for Image routines to avoid sec
1225 stack usage.
1226
12272007-12-13 Javier Miranda <miranda@adacore.com>
1228 Ed Schonberg <schonberg@adacore.com>
1229
1230 * sem_ch3.ads, sem_ch3.adb (Check_Abstract_Overriding): Avoid
1231 generation of spurious error if parent is an interface type; caused
1232 because predefined primitive bodies will be generated later by
1233 Freeze_Record_Type.
1234 (Process_Subtype): The subtype inherits the Known_To_Have_Preelab_Init
1235 flag.
1236 (Derive_Subprograms): Handle derivations of predefined primitives
1237 after all the user-defined primitives to ensure that they are
1238 found in proper order in instantiations.
1239 (Add_Interface_Tag_Components, Inherit_Components): Update occurrences
1240 of Related_Interface to Related_Type.
1241 (Record_Type_Declaration): Minor reordering of calls to decorate the
1242 Tag component because the entity must have set its Ekind attribute
1243 before setting its Is_Tag attribute.
1244 (Analyze_Subtype_Declaration): In the case of subtypes with
1245 Private_Kind, inherit Known_To_Have_Preelab_Init from the parent.
1246
12472007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
1248 Ed Schonberg <schonberg@adacore.com>
1249
1250 * sem_ch4.adb (Analyze_Selected_Component): Include the requeue
1251 statement to the list of contexts where a selected component with a
1252 concurrent tagged type prefix should yield a primitive operation.
1253 (Find_Primitive_Operation): Handle case of class-wide types.
1254 (Analyze_Overloaded_Selected_Component): If type of prefix is
1255 class-wide, use visible components of base type.
1256 (Resolve_Selected_Component): Ditto.
1257 (Try_Primitive_Operation, Collect_Generic_Type_Ops): If the type is a
1258 formal of a generic subprogram. find candidate interpretations by
1259 scanning the list of generic formal declarations.:
1260 (Process_Implicit_Dereference_Prefix): If the prefix has an incomplete
1261 type from a limited_with_clause, and the full view is available, use it
1262 for subsequent semantic checks.
1263 (Check_Misspelled_Selector): Use Namet.Sp.Is_Bad_Spelling_Of function
1264 (Find_Primitive_Operation): New function.
1265 (Analyze_Overloaded_Selected_Component): insert explicit dereference
1266 only once if several interpretations of the prefix yield an access type.
1267 (Try_Object_Operation): Code and comment cleanup.
1268 (Analyze_Selected_Component): Reorder local variables. Minot comment and
1269 code reformatting. When the type of the prefix is tagged concurrent, a
1270 correct interpretation might be available in the primitive and
1271 class-wide operations of the type.
1272
12732007-12-13 Robert Dewar <dewar@adacore.com>
1274 Ed Schonberg <schonberg@adacore.com>
1275
1276 * sem_ch8.adb (Analyze_Subprogram_Renaming): Special error message for
1277 renaming entry as subprogram using rename-as-body if subprogram spec
1278 frozen.
1279 (Use_One_Type): The clause is legal on an access type whose designated
1280 type has a limited view.
1281 (Find_Direct_Name): Use Namet.Sp.Is_Bad_Spelling_Of function
1282 (Find_Expanded_Name): Use Namet.Sp.Is_Bad_Spelling_Of function
1283 (Analyze_Renamed_Primitive_Operation): new procedure to determine the
1284 operation denoted by a selected component.
1285 (Analyze_Renamed_Entry): Resolve the prefix of the entry name, because
1286 it can be an expression, possibly overloaded, that returns a task or
1287 an access to one.
1288
12892007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
1290 Gary Dismukes <dismukes@adacore.com>
1291
1292 * sem_ch9.adb (Analyze_Requeue): Add a local flag to capture whether a
1293 requeue statement is dispatching. Do not emit an error when the name is
1294 not an entry and the context is a dispatching select. Add code to
1295 perform subtype conformance between the formals of the current entry
1296 and those of the target interface primitive.
1297 (Analyze_Asynchronous_Select, Analyze_Conditional_Entry_Call, Analyze_
1298 Timed_Entry_Call): Analyze the triggering statement as the first step of
1299 the processing. If this is a dispatching select, postpone the analysis
1300 of all select statements until the Expander transforms the select. This
1301 approach avoids generating duplicate identifiers after the Expander has
1302 replicated some of the select statements. In case the Expander is
1303 disabled, perform regular analysis.
1304 (Check_Triggering_Statement): New routine.
1305 (Analyze_Requeue): Exclude any interpretations that are not entries when
1306 checking overloaded names in a requeue. Also test type conformance for
1307 matching interpretations rather than requiring subtype conformance at
1308 that point to conform with the RM's resolution rule for requeues.
1309
13102007-12-13 Ed Schonberg <schonberg@adacore.com>
1311
1312 * sem_disp.adb (Check_Dispatching_Call): If an actual in a call to an
1313 inherited operation is a defaulted tag-indeterminate call, and there is
1314 a statically tagged actual, use the static tag as a controlling actual
1315 for the defaulted actual.
1316
13172007-12-13 Geert Bosch <bosch@adacore.com>
1318
1319 * sem_eval.adb (Eval_Real_Literal): N_Constant_Declaration is a static
1320 context, so do not call Check_Non_Static_Context.
1321
13222007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
1323
1324 * sem_type.adb (Function_Interp_Has_Abstract_Op): Add guard to check
1325 whether formal E is an entity which may have parameters.
1326
13272007-12-13 Bob Duff <duff@adacore.com>
1328 Javier Miranda <miranda@adacore.com>
1329 Robert Dewar <dewar@adacore.com>
1330
1331 * sem_util.ads, sem_util.adb (Is_Concurrent_Interface): New routine.
1332 (Set_Convention): New procedure to set the Convention flag, and in
1333 addition make sure the Favor_Top_Level flag is kept in sync (all
1334 foreign-language conventions require Favor_Top_Level = True).
1335 (Collect_Abstract_Interfaces): Update occurrences of Related_Interface
1336 to Related_Type.
1337 (Collect_Interfaces_Info): Minor update to handle the two secondary
1338 dispatch tables. Update occurrence of Related_Interface to Related_Type.
1339 (Generate_Parent_Ref): Add parameter to specify entity to check
1340 (Is_Preelaborable_Expression): Allow the name of a discriminant to
1341 initialize a component of a type with preelaborable initialization.
1342 This includes the case of a discriminal used in such a context.
1343 (Is_Dependent_Component_Of_Mutable_Object): Take into account the
1344 latest Ada 2005 rules about renaming and 'Access of
1345 discriminant-dependent components.
1346 (Check_Nested_Access): Add handling when there are no enclosing
1347 subprograms (e.g. case of a package body).
1348 (Find_Parameter_Type): Factor routine from several other compiler files.
1349 Remove routine from Find_Overridden_Synchronized_Primitive.
1350
13512007-12-13 Thomas Quinot <quinot@adacore.com>
1352
1353 * sinput.adb (Get_Source_File_Index): Add assertion to guard against
1354 an invalid access to an uninitialized slot in the
1355 Source_File_Index_Table.
1356
13572007-12-13 Thomas Quinot <quinot@adacore.com>
1358
1359 * sinput-l.adb (Load_File): Disable style checks when preprocessing.
1360
13612007-12-13 Bob Duff <duff@adacore.com>
1362
1363 * s-soflin.ads: Apply new pragma Favor_Top_Level to all
1364 access-to-subprogram types in this package.
1365
13662007-12-13 Olivier Hainque <hainque@adacore.com>
1367
1368 * s-stausa.ads (Stack_Analyzer): Remove First_Is_Topmost, redundant
1369 with Stack_Grows_Down in System.Parameters. Rename Array_Address into
1370 Stack_Overlay_Address and document that we are using an internal
1371 abstraction.
1372 (Byte_Size, Unsigned_32_Size): Remove, now useless.
1373 (Pattern_Type, Bytes_Per_Pattern): New subtype and constant, to be used
1374 consistently throughout the various implementation pieces.
1375
1376 * s-stausa.adb (Stack_Slots): New type, abstraction for the stack
1377 overlay we are using to fill the stack area with patterns.
1378 (Top_Slot_Index_In, Bottom_Slot_Index_In): Operations on Stack_Slots.
1379 (Push_Index_Step_For, Pop_Index_Step_For): Likewise.
1380 (Fill_Stack, Compute_Result): Use the Stack_Slots abstraction.
1381
13822007-12-13 Robert Dewar <dewar@adacore.com>
1383
1384 * s-stoele.adb ("mod"): mod negative value raises Constraint_Error
1385
13862007-12-13 Arnaud Charlet <charlet@adacore.com>
1387
1388 * s-tassta.adb:
1389 (Create_Task): Take into account tasks created by foreign threads.
1390 Code clean up: use constants instead of hard coded values.
1391
13922007-12-13 Robert Dewar <dewar@adacore.com>
1393
1394 * styleg.adb (Check_Comment): More liberal rules for comment placement
1395
13962007-12-13 Olivier Hainque <hainque@adacore.com>
1397
1398 * tb-alvms.c (struct tb_entry_t, __gnat_backtrace): Revert back to use
1399 of Procedure Value instead of Frame Pointer as the invocation
1400 identifier associated with the instruction pointer in each traceback
1401 entry.
1402
1403 * g-trasym-vms-alpha.adb (Traceback_Entry, PV_For, FP_For,
1404 TB_Entry_For): Revert back to use of Procedure Value instead of Frame
1405 Pointer as the invocation identifier passed to tbk$symbolize.
1406
1407 * s-traent-vms.ads, s-traent-vms.adb
1408 (Traceback_Entry, PV_For, FP_For, TB_Entry_For): Revert back to use of
1409 Procedure Value instead of Frame Pointer as the invocation identifier
1410 passed to tbk$symbolize.
1411
14122007-12-13 Robert Dewar <dewar@adacore.com>
1413
1414 * tbuild.ads, tbuild.adb:
1415 Fix location of flag for unrecognized pragma message
1416
14172007-12-13 Robert Dewar <dewar@adacore.com>
1418
1419 * treepr.ads, treepr.adb: (pl): implement use of positive value
1420 shorthands
1421
14222007-12-13 Robert Dewar <dewar@adacore.com>
1423
1424 * xeinfo.adb: Remove warnings
1425 * xnmake.adb: Remove warnings
1426 * xsinfo.adb: Remove warnings
1427 * xtreeprs.adb: Remove warnings
1428 * xsnames.adb: Remove warnings
1429
1430 * a-ngcoar.adb: Fix typo.
1431 * s-interr.adb: Minor reformatting
1432 * env.c: Minor reformatting.
1433 * g-bytswa.adb: Minor reformatting.
1434 * g-rannum.ads: Minor documentation improvements
1435 * s-tasinf-mingw.adb: Minor header fix
1436 * a-clrefi.adb: Minor reformatting
1437 * g-sttsne.ads: Minor documentation improvement
1438 * g-sttsne-locking.ads: Minor documentation improvement
1439 * g-soliop-solaris.ads: Minor documentation improvement
1440 * g-soliop-mingw.ads: Minor documentation improvement
1441 * g-soliop.ads: Minor documentation improvement
1442 * exp_aggr.ads: Minor reformatting
1443 * debug.adb: Add documentation for the gprbuild debug flags
1444 * exp_ch2.adb: Use Nkind_In to simplify code throughout
1445 * exp_pakd.adb: Minor reformatting
1446
1447 * g-altive.ads, g-alleve.adb: Remove assertions.
1448 Add comment about minor differences between targets regarding
1449 floating-point operations.
1450
1451 * g-thread.adb: Remove pragma unreferenced.
1452 * lib.ads: Minor reformatting
1453 * par-ch9.adb: Minor reformatting of error messages
1454 * sem_case.adb: Minor reformatting
1455 * s-fileio.adb: Minor reformattinng
1456 * s-vmexta.ads: Minor typo
1457 * vxaddr2line.adb:
1458 Take into account 'Success' value as per new GNAT warning.
1459
14602007-12-13 Vincent Celier <celier@adacore.com>
1461
1462 * a-direct.adb (Create_Path): Always take '/' as a directory separator,
1463 even on Windows
1464
14652007-12-13 Robert Dewar <dewar@adacore.com>
1466 Bob Duff <duff@adacore.com>
1467
1468 * gnat_ugn.texi: Dcoument new rules for style check comment alignment
1469 Document that suffixes may be terminations of each others
1470 Add doc for -gnatw.a and -gnatw.A
1471 Document gnatbind -Wx switch
1472 Document BOM recognition
1473 Document pragma Implemented_By_Entry.
1474 Document new units.
1475
1476 * gnat_rm.texi: (Favor_Top_Level): Document new pragma.
1477 Add doc for pragma Unreferenced suppressing no entities referenced msg
1478 Add documentation of GNAT.Directory_Operations.Iteration
1479 Add documentation of GNAT.Random_Numbers
1480 Add documentation for pragma Shared.
1481 Correct documentation for Bit_Order
1482 Add documentation for the Pool_Address attribute.
1483 Fix and improve documentation of pragma machine_attribute.
1484 New pragma Fast_Math
1485 Document BOM recognition
1486
1487 * vms_data.ads: Add entries for -gnatw.a -gnatw.A
1488 Add /Wide_Character_Encoding for binder
1489 Add qualifier for the new gnatpp option --no-separate-loop-then
1490
14912007-12-13 Matthew Heaney <heaney@adacore.com>
1492
1493 * a-cohase.ads, a-cihama.ads, a-cihase.ads, a-cohama.ads: Document
1494 which generic formal operations are called for each operation.
1495
14962007-12-13 Olivier Hainque <hainque@adacore.com>
1497
1498 * tb-gcc.c (uw_data_t, trace_callback): Only define if not GCC-SJLJ eh.
1499 (__gnat_backtrace): Early return 0 if using GCC-SJLJ eh.
1500
15012007-12-13 Emmanuel Briot <briot@adacore.com>
1502
1503 * s-os_lib.ads, s-os_lib.adb (Normalize_Pathname): Do not compute
1504 Reference_Dir unless we actually need it.
1505
15062007-12-13 Vasiliy Fofanov <fofanov@adacore.com>
1507 Tristan Gingold <gingold@adacore.com>
1508
1509 * g-socthi-vms.ads (Fd_Set_Access): make it 32-bit.
1510
1511 * s-osprim-vms.adb,
1512 a-calend-vms.adb: Remove pragma warning off and add pragma
1513 unreferenced.
1514
15152007-12-13 Robert Dewar <dewar@adacore.com>
1516
1517 * impunit.adb: Add entries for missing units
1518
1519 * Makefile.rtl: Add new run-time units.
1520
1521 * Make-lang.in: Update dependencies.
1522
15232007-12-13 Bob Duff <duff@adacore.com>
1524
1525 * itypes.ads, itypes.adb (Create_Itype): For access-to-subprogram
1526 types, set Can_Use_Internal_Rep appropriately, based on
1527 Always_Compatible_Rep_On_Target.
1528
15292007-12-13 Gary Dismukes <dismukes@adacore.com>
1530 Arnaud Charlet <charlet@adacore.com>
1531
1532 * make.adb (Scan_Make_Arg): Add test for -aamp_target switch, passing
1533 it to the front end and setting the aamp_target environment variable
1534 to the switch's argument to ensure that gnaampbind and gnaamplink will
1535 take the specified library into account.
1536 (Make): Only set Check_Object_Consistency to False for JVM, not for CIL
1537 target, since the CIL compiler supports an "object" file (.il files).
1538
15392007-12-13 Vincent Celier <celier@adacore.com>
1540
1541 * symbols-processing-vms-ia64.adb (Process.Skip_Half): New procedure
1542 (Process.H): Remove variable. Replace Read_Half (H) with Skip_Half.
1543
15442007-12-13 Geert Bosch <bosch@adacore.com>
1545
1546 * s-parame-vxworks.adb:
1547 Update comments to reflect usage of this package by Nucleus.
1548
15492007-12-13 Arnaud Charlet <charlet@adacore.com>
1550
1551 * i-vxwork.ads: Kill new warning on Convention C, since changing the
1552 spec would break code.
1553
1554 * i-forbla-unimplemented.ads, vx_stack_info.c: New files.
1555
1556 * system-vxworks-alpha.ads: Removed.
1557
e74a122e
EB
15582007-12-10 Eric Botcazou <ebotcazou@adacore.com>
1559
1560 * ada-tree.h (TYPE_RETURNS_BY_TARGET_PTR_P): Move around.
1561
5320014a
ST
15622007-12-09 Samuel Tardieu <sam@rfc1149.net>
1563
1564 PR ada/34366
1565 * sem_ch3.adb (Designates_T): New function.
1566 (Mentions_T): Factor reusable part of the logic into Designates_T.
1567 Consider non-access parameters and access and non-access result.
1568 (Check_Anonymous_Access_Components): Set ekind of anonymous access to
1569 E_Subprogram_Type to E_Anonymous_Access_Subprogram_Type.
1570
1571 * einfo.ads: Update comment for E_Anonymous_Access_Subprogram_Type.
1572
da746f77
LB
15732007-12-07 Ludovic Brenta <ludovic@ludovic-brenta.org>
1574
9d651736 1575 PR ada/34361
da746f77
LB
1576 * mlib-tgt.adb, mlib-tgt.ads: Fix comments at the top to reflect
1577 the new implementation of target-specific calls.
1578
ebe0660b
OH
15792007-12-07 Olivier Hainque <hainque@adacore.com>
1580
1581 * decl.c (gnat_to_gnu_entity) <case E_Access_Type>: When computing
1582 the designated full view, only follow a second level Full_View link
1583 for Non_Limited_Views of from_limited_with references.
1584
2eb160f2
ST
15852007-12-07 Samuel Tardieu <sam@rfc1149.net>
1586
1587 PR ada/15805
1588 * sem_ch6.adb (Process_Formals): Prevent an access type formal
1589 to be initialized with an access to constant object.
1590
9cc11b58
ST
1591 * sem_ch3.adb (Analyze_Object_Declaration): Signal an error
1592 when an access to constant is used to initialize an access
1593 value.
1594
72f69ddf
ST
1595 PR ada/21346
1596 * a-direct.adb (Compose): Containing_Directory can be an empty string.
1597
5a2fe31a
OH
15982007-12-07 Olivier Hainque <hainque@adacore.com>
1599
1600 PR ada/34173
1601 * decl.c (gnat_to_gnu_entity) <case E_Array_Type>: When setting
1602 the alignment on the GCC XUA array type, set TYPE_USER_ALIGN if
1603 this is from an alignment clause on the GNAT entity.
1604 * utils.c (create_field_decl): Rewrite the computation of DECL_ALIGN
1605 to distinguish the case where we set it from the type's alignment.
1606 When so, propagate TYPE_USER_ALIGN into DECL_USER_ALIGN to indicate
1607 whether this alignment was set from an explicit alignment clause.
1608
4039fb35
EB
16092007-12-06 Eric Botcazou <ebotcazou@adacore.com>
1610
1611 * decl.c (make_packable_type): Revert last change.
1612 (gnat_to_gnu_field): Avoid setting size and position multiple times.
1613 * utils.c (finish_record_type): Retrieve the real name of the type.
1614
0ec479dc
EB
16152007-12-05 Eric Botcazou <ebotcazou@adacore.com>
1616
1617 * trans.c (lvalue_required_p): Take base node directly instead
1618 of its parent. Rename second parameter to 'gnu_type'.
1619 <N_Indexed_Component>: Return 0 if the node isn't the prefix.
1620 <N_Slice>: Likewise.
1621 (Identifier_to_gnu): Rename parent_requires_lvalue to require_lvalue.
1622 Adjust calls to lvalue_required_p.
1623
07c7262e
ST
16242007-12-05 Samuel Tardieu <sam@rfc1149.net>
1625
1626 PR ada/21489
1627 * exp_ch9.adb (Build_Simple_Entry_Call): Initialize OUT access type
1628 parameters of an entry call.
1629
403fd939
RD
16302007-12-03 Robert Dewar <dewar@adacore.com>
1631 Samuel Tardieu <sam@rfc1149.net>
1632
1633 PR ada/34287
1634 * sem_util.adb (Safe_To_Capture_Value): Do not capture values
1635 of variables declared in a library-level package.
1636
0bcb4d2a
ST
16372007-12-02 Samuel Tardieu <sam@rfc1149.net>
1638
1639 * clean.adb (Clean_Library_Directory): Use Empty_String'Access intead
1640 of Empty_String'Unchecked_Access.
1641
dd9c642a
ST
1642 * Makefile.in: Add support for sh4-linux.
1643
1644 * system-linux-sh4.ads: New file.
1645
35330114
KB
16462007-12-01 Kostik Belousov <kostikbel@ukr.net>
1647
1648 PR ada/33722
1649 * env.c (__gnat_setenv): FreeBSD 7 has a POSIX conformant putenv()
1650 and its argument must not be free()ed.
1651
a6dcb051
EB
16522007-11-29 Eric Botcazou <ebotcazou@adacore.com>
1653
1654 * decl.c (make_packable_type): Retrieve the real name of the type.
1655 (maybe_pad_type): Simplify similar code.
1656
39a97416
ST
16572007-11-28 Samuel Tardieu <sam@rfc1149.net>
1658
a6968b8b 1659 PR ada/15804
39a97416
ST
1660 * par-ch3.adb (P_Variant_Part): Signal an error when anything other
1661 than an identifier is used after "case" in a variant_part.
1662
b99dfeb3 1663 PR ada/17318
9c5a3a8d
ST
1664 * par-ch4.adb (Is_Parameterless_Attribute): New map.
1665 (P_Name, Scan_Apostrophe block): Parse left parenthesis following
1666 attribute name or not depending on the new map.
1667
1668 * sem-attr.adb (Analyze_Attribute): Parameterless attributes
1669 returning a string or a type will not be called with improper
1670 arguments.
1671
1672 * sem-attr.ads (Attribute_Class_Array): Move to snames.ads.
1673
1674 * snames.ads (Attribute_Class_Array): Moved from sem-attr.ads.
1675
5a218498
ST
1676 PR ada/32792
1677 * sem_attr.adb (Analyze_Attribute, Attribute_Integer_Value clause):
1678 Signal an error when attribute argument is a fixed-point value of
1679 an unknown type.
1680
7bde4677
ST
1681 PR ada/22559
1682 * sem_ch3.adb (Build_Derived_Numeric_Type): Do not set RM_Size on
1683 a derived ordinary fixed point type.
1684
1685 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Recompute
1686 RM_Size when a Small clause is found.
1687
182e0d71
AK
16882007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1689
1690 PR 34081/C++
1691 * trans.c (Subprogram_Body_to_gnu, Compilation_Unit_to_gnu):
1692 Pass 'false' for the new allocate_struct_function parameter.
1693 * utils.c (build_function_stub): Likewise.
1694
87caf699
RG
16952007-11-25 Richard Guenther <rguenther@suse.de>
1696
4039fb35 1697 * utils.c (gnat_pushlevel): Use BLOCK_CHAIN.
87caf699
RG
1698 (gnat_poplevel): Likewise.
1699
f1c8c7ee
EB
17002007-11-25 Eric Botcazou <ebotcazou@adacore.com>
1701
1702 * decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the type has
1703 strict alignment, no alignment clause and a known static size, cap
1704 the type alignment to the greatest power of 2 factor of the size.
1705 (gnat_to_gnu_field): If the field has a component clause, is aliased
1706 or of a type with strict alignment, require that its size be equal to
1707 that of the type.
1708 (validate_size): Use the type size as the minimum size for a type with
1709 strict alignment.
1710
bb1f5840
ST
17112007-11-23 Samuel Tardieu <sam@rfc1149.net>
1712
1713 * s-inmaop-posix.adb, s-intman-vxworks.adb, s-taprop-hpux-dce.adb,
1714 s-taprop-irix.adb, s-taprop-linux.adb, s-taprop-lynxos.adb,
1715 s-taprop-posix.adb, s-taprop-tru64.adb, s-taprop-vxworks.adb:
1716 Use 'Access instead of 'Unchecked_Access in second and third
1717 arguments of pthread_sigmask.
1718
5102fac5
EB
17192007-11-23 Eric Botcazou <ebotcazou@adacore.com>
1720
1721 * decl.c (ceil_alignment): New function.
1722 (gnat_to_gnu_entity): Use it to set the alignment on atomic types.
1723 (make_packable_type): Likewise.
1724
1fa4dfc6
OH
17252007-11-22 Olivier Hainque <hainque@adacore.com>
1726
1727 * trans.c (gnat_to_gnu) <case N_Free_Statement>: Reformat lines
1728 to fit in 80 columns.
1729
5f45b299
AJ
17302007-11-21 Aurelien Jarno <aurelien@aurel32.net>
1731
1732 * s-osinte-kfreebsd-gnu.ads (To_Target_Priority): New function.
1733 * Makefile.in: Add EH_MECHANISM=-gcc to kfreebsd-gnu. Remove SYMLIB.
1734
7634135a
EB
17352007-11-19 Eric Botcazou <ebotcazou@adacore.com>
1736
1737 PR ada/34098
1738 * misc.c (gnat_adjust_rli): Delete.
1739 (gnat_init): Do not initialize the translation code here.
1740 Do not call set_lang_adjust_rli.
1741 * trans.c (init_code_table): Make static.
1742 (gnat_init_stmt_group): Delete.
1743 (gigi): Initialize the translation code entirely here.
1744 Emit debug info for the common types here instead of...
1745 * utils.c (gnat_init_decl_processing): ...here.
1746 * gigi.h (init_code_table): Delete.
1747 (gnat_init_stmt_group): Likewise.
1748
b2c3bcf4
OH
17492007-11-16 Olivier Hainque <hainque@adacore.com>
1750
1751 * utils2.c (build_call_alloc_dealloc) <if gnu_obj>: Move the code
1752 retrieving an allocator return value from a super-aligned address from
1753 here to ...
1754 * trans.c (gnat_to_gnu) <case N_Free_Statement>: ... here, and don't
1755 expect a super-aligned address for a fat or thin pointer.
1756
a01e283f
EB
17572007-11-14 Eric Botcazou <ebotcazou@adacore.com>
1758
1759 * trans.c (call_to_gnu): Always set the source location on the call
1760 expression. If the function returns-by-target, also set it on the
1761 address expression.
1762
713c3145
ST
17632007-11-14 Samuel Tardieu <sam@rfc1149.net>
1764
356d8961 1765 * adaint.c, init.c, initialize.c, link.c: Remove system-specific
713c3145
ST
1766 sections of non-supported Interix target.
1767
1768 * s-osinte-interix.ads: Removed.
1769
1e992e16
ST
1770 * i-cstrin.ads (chars_ptr): Make it a C convention type.
1771
0e506c4b
ST
17722007-11-13 Samuel Tardieu <sam@rfc1149.net>
1773
1774 * a-tasatt.adb: Add a comment at the beginning of the package
1775 explaining why in general 'Unchecked_Access must be used instead
1776 of 'Access.
1777
66beb09b
ST
1778 * sem_prag.adb (Process_Convention): Move the test for the
1779 entity on which the Convention pragma applies down to also
1780 forbid pragma Convention on enumeration literals reached
1781 through renamings.
1782
14678e46
ST
17832007-11-10 Samuel Tardieu <sam@rfc1149.net>
1784
1785 * a-tasatt.adb: Revert previous change for this file as it will
1786 generate an error when this package is instantiated from a
1787 local context.
1788
f9d806de
ST
17892007-11-07 Samuel Tardieu <sam@rfc1149.net>
1790
1791 * a-tasatt.adb: Type Wrapper should be declared in comment instead
1792 of already declared type Node_Access.
dcbd752d
ST
1793 Use 'Access instead of 'Unchecked_Access when applicable. Local
1794 lifetime is the one of the package.
1795 (Set_Value): W is allocated on the heap.
1796
1797 * g-socket.adb: Use 'Access instead of 'Unchecked_Access when
1798 applicable.
1799 (Get_Socket_Option): Optlen formal of C_Getsockopt is of an anonymous
1800 access type.
1801 (Receive_Socket): Fromlen formal of C_Recvfrom is of an anonymous
1802 access type.
1803
1804 * s-taasde.adb: Use 'Access instead of 'Unchecked_Access when
1805 applicable.
1806 (elaboration code): Timer_Queue lifetime is the one of the
1807 package.
f9d806de 1808
bc01690e
ST
1809 * tracebak.c (i386 alternative): Remove useless comparaison
1810 which is always false; LOWEST_ADDRESS is 0 and is never greater
1811 than an unsigned integer.
1812
d9c1dc68
ST
1813 * sem_attr.adb (Analyze_Attribute): Remove duplicate identical
1814 embedded check for "Ada_Version >= Ada_05".
1815
cb88a3ea
OH
18162007-11-07 Olivier Hainque <hainque@adacore.com>
1817
1818 * decl.c (make_aligning_type): Set the mode of the RECORD_TYPE we
1819 craft and expand comment.
1820
233a722b
EB
18212007-11-01 Eric Botcazou <ebotcazou@adacore.com>
1822
1823 * lang-specs.h: Move translation of -fRTS= after -gnatez switch.
1824
6d1e8bff
EB
18252007-10-23 Eric Botcazou <ebotcazou@adacore.com>
1826
1827 * misc.c (gnat_handle_option): Replace call to abort with
1828 call to gcc_unreachable.
1829 (gnat_init): Likewise.
1830 (gnat_expand_expr): Likewise.
1831 (fp_prec_to_size): Likewise.
1832 (fp_size_to_prec): Likewise.
1833
262e7125
RG
18342007-10-23 Richard Guenther <rguenther@suse.de>
1835
1836 PR bootstrap/33608
1837 * tracebak.c: #undef abort after including system.h.
1838
c8f499a9
DS
18392007-10-20 Danny Smith <dannysmith@users.sourceforge.net>
1840
1841 * Makefile.in (LIBGNAT_TARGET_PAIRS) Add s-tasinf-mingw.adb,
1842 s-tasinf-mingw.ads, a-exetim-mingw.adb, a-exetim-mingw.ads
1843 for win32 targets.
1844 (EXTRA_GNATRTL_TASKING_OBJS): Add a-exetim.o for win32 targets.
1845
f0e1e807
AC
18462007-10-15 Eric Botcazou <ebotcazou@adacore.com>
1847
1848 * s-osinte-tru64.adb: (Hide_Yellow_Zone): Add On parameter.
1849 Set the protection status of the guard page based on the value of On.
1850
1851 * s-osinte-tru64.ads: (Hide_Yellow_Zone): Add On parameter.
1852
1853 * s-taprop-tru64.adb: (Enter_Task): Pass True to Hide_Yellow_Zone.
1854 (Exit_Task): Pass False to Hide_Yellow_Zone.
1855
18562007-10-15 Robert Dewar <dewar@adacore.com>
1857
1858 * s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
1859 s-taprop-vxworks.adb, s-taprop-posix.adb, a-calend-vms.adb,
1860 a-calend.adb, a-nuflra.adb, a-tigeau.adb, a-wtgeau.adb,
1861 checks.adb, bindgen.adb, eval_fat.adb, exp_fixd.adb, fmap.adb,
1862 freeze.adb, g-awk.adb, g-calend.adb, g-diopit.adb, g-expect.adb,
1863 gnatchop.adb, gnatlink.adb, g-spipat.adb, g-thread.adb, make.adb,
1864 mdll.adb, mlib.adb, mlib-prj.adb, osint.adb, par-ch3.adb, prj.adb,
1865 prj-makr.adb, sem_prag.adb, sem_type.adb, s-fatgen.adb, s-fileio.adb,
1866 sinfo.ads, sinput-d.adb, s-taasde.adb, s-tasdeb.ads, s-tasren.adb,
1867 s-tassta.adb, s-tpobop.adb, s-tposen.adb, stylesw.adb, types.ads,
1868 uintp.adb, validsw.adb, makegpr.adb, a-rbtgso.adb, a-crbtgo.adb,
1869 a-coorse.adb, a-convec.adb, a-coinve.adb, a-cohama.adb, a-ciorse.adb,
1870 a-cihama.adb, a-cidlli.adb, a-chtgop.adb, a-cdlili.adb, a-cdlili.adb,
1871 a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cohase.adb, a-ciorma.adb,
1872 a-coorma.adb, a-ztgeau.adb, symbols-vms.adb, a-crdlli.adb,
1873 a-calari.adb, a-calfor.adb, s-os_lib.adb, s-regpat.adb, a-ngrear.adb:
1874 Minor reformatting.
1875 Add Unreferenced and Warnings (Off) pragmas for cases of
1876 variables modified calls where they are IN OUT or OUT parameters and
1877 the resulting values are not subsequently referenced. In a few cases,
1878 we also remove redundant code found by the new warnings.
1879
1880 * ug_words, vms_data.ads, usage.adb, sem_util.adb, sem_util.ads,
1881 sem_warn.adb, sem_warn.ads, sem_res.adb, sem_ch7.adb, sem_ch8.adb,
1882 sem_ch5.adb, opt.ads, lib-xref.adb, lib-xref.ads, exp_smem.adb,
1883 sem_ch11.adb, exp_ch6.adb, einfo.ads, einfo.adb: implement a new
1884 warning controlled by -gnatw.o that warns on cases of out parameter
1885 values being ignored.
1886
18872007-10-15 Geert Bosch <bosch@adacore.com>
1888
1889 * adaint.c, socket.c, cal.c: Initial port to arm-mentor-nucleus.
1890
1891 * expect.c: Initial port to arm-mentor-nucleus.
1892 Use kill for __gnat_kill() on VMS.
1893
18942007-10-15 Emmanuel Briot <briot@adacore.com>
1895
1896 * ali.ads, ali.adb (Scan_ALI): Initialize XE.Tref to a known default
1897 value.
1898 (Xref_Record): Change type for Line, since in the case of a reference to
1899 a predefined entity (as happens for array index types), the line is set
1900 to 0.
1901 Add support for parsing multiple array index types info, or
1902 multiple inherited interfaces info. This information cannot be stored
1903 in Xref_Entity_Record, which only supports a single instance of Tref_*,
1904 and is therefore stored in the list of references instead. It has a
1905 special treatement later on in tools that use this information.
1906
19072007-10-15 Tristan Gingold <gingold@adacore.com>
1908
1909 * debug.adb: Document use of -gnatd.a and -gnatd.I
1910
1911 * layout.adb: On OpenVMS -gnatd.a disables alignment optimization.
1912
19132007-10-15 Javier Miranda <miranda@adacore.com>
1914
1915 * exp_attr.adb (Expand_N_Attribute_Reference): Case Access,
1916 Unchecked_Access, and Unrestricted_Access. Cleanup code that takes
1917 care of access to class-wide interface types plus removal of bizarre
1918 conversion of tagged object to access type (reported by Gary
1919 Dismukes). After this patch there is no need to perform any
1920 additional management on these nodes in Expand_Interface_Actuals.
1921
1922 * exp_disp.adb (Expand_Interface_Actuals): Code cleanup. Remove code
1923 that handles use of 'Access and 'Unchecked_Access applied to
1924 actuals covering interface types. Such code is now
1925 centralized in Expand_N_Attribute_Reference.
1926
19272007-10-15 Ed Schonberg <schonberg@adacore.com>
1928
1929 * exp_ch3.adb (Build_Init_Procedure): Keep separate the initialization
1930 of tagged types whose ultimate ancestor is a CPP type.
1931 (Freeze_Array_Type): For a packed array type, generate an initialization
1932 procedure if the type is public, to handle properly a client that
1933 specifies Normalize_Scalars.
1934
19352007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
1936
1937 * exp_ch9.adb (Actual_Index_Expression): When the expansion occurs
1938 inside a generic body, retrieve the full view of the entry family
1939 discrete subtype if available.
1940
19412007-10-15 Thomas Quinot <quinot@adacore.com>
1942
1943 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies): Do not
1944 attempt to generate stubs for hidden primitive operations.
1945
19462007-10-15 Vincent Celier <celier@adacore.com>
1947
1948 * mlib-tgt-specific.adb (Support_For_Libraries): New function,
1949 returning None, used when there is no platform specific body for
1950 MLib.Tgt.Specific.
1951
19522007-10-15 Bob Duff <duff@adacore.com>
1953
1954 * sem_case.adb, sem_ch13.adb, lib-sort.adb: Replace use of Heap_Sort_A
1955 (passing'Unrestricted_Access of nested subprograms to Sort) with use of
1956 the generic Heap_Sort_G, in order to avoid trampolines.
1957
19582007-10-15 Vasiliy Fofanov <fofanov@adacore.com>
1959 Jose Ruiz <ruiz@adacore.com>
1960
1961 * vx_stack_info.c: New file.
1962
1963 * i-forbla-unimplemented.ads: New file.
1964
1965 * Makefile.in: i-forbla-unimplemented.ads: a variant of i-forbla.ads
1966 for unsupported configurations; use it on VMS targets instead of the
1967 real one.
1968 (EXTRA_LIBGNAT_SRCS,EXTRA_LIBGNAT_OBJS for VxWorks): Include
1969 vx_stack_info.{c,o} that contains the routine __gnat_get_stack_info
1970 used by VxWorks targets to have access to task-specific data and be
1971 able to extract the stack boundaries for stack checking.
1972 Use system-vms-ia64.ads on ivms.
1973
1974 * Make-lang.in: Update dependencies.
1975
1976 * sysdep.c (__gnat_get_stack_info): Move to a standalone file
1977 (vx_stack_info.c).
1978
19792007-10-15 Vincent Celier <celier@adacore.com>
1980
1981 * snames.adb, snames.ads: Add new standard name runtime_library_dir
1982
1983 * prj.ads (Language_Config): Add new component Runtime_Library_Dir
1984
1985 * prj-attr.adb: Add project level attribute Runtime_Library_Dir
1986
1987 * prj-env.adb (Create_Mapping_File): Do not put an entry if the path of
1988 the source is unknown.
1989
1990 * prj-ext.adb: Spelling error fix
1991
1992 * prj-nmsc.adb (Check_Ada_Name): Reject any unit that includes an Ada
1993 95 reserved word in its name.
1994 (Process_Project_Level_Array_Attributes): Process new attribute
1995 Runtime_Library_Dir.
1996
1997 * prj-part.adb (Parse_Single_Project): Do not check the name of the
1998 config project against the user project names.
1999
2000 * prj-proc.adb (Expression): In multi-language mode, indexes that do
2001 not include a dot are always case insensitive.
2002 (Process_Declarative_Items): Ditto
2003 (Process_Project_Tree_Phase_1): Set Success to False in case an error is
2004 detected.
2005
2006 * prj-util.adb (Value_Of (In_Array)): When Force_Lower_Case_Index is
2007 True, compare both indexes in lower case.
2008
20092007-10-15 Robert Dewar <dewar@adacore.com>
2010
2011 * rtsfind.adb: (Load_RTU): Turn off style checks for Load call
2012
20132007-10-15 Gary Dismukes <dismukes@adacore.com>
2014
2015 * sem_aggr.adb (Resolve_Record_Aggregate): In the case of a box
2016 association for an access component, add an association with null as
2017 the expression. Remove testing for array subtypes and the setting in
2018 that case of Ctyp to the array component type, which prevented proper
2019 inclusion of an association for null-initialized arrays. Collapse
2020 condition that tests for array subtypes into just a test of
2021 Is_Partially_Initialized_Type (which already covers arrays anyway).
2022
20232007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
2024
2025 * sem_ch12.adb: Minor code reformatting.
2026 (Check_Generic_Child_Unit): Iterate over the homonym chain in order to
2027 find the parent package which may have been hidden by local
2028 declarations.
2029
20302007-10-15 Gary Dismukes <dismukes@adacore.com>
2031
2032 * sem_ch3.adb (Build_Derived_Concurrent_Type): Set the Is_Constrained
2033 flag of derived concurrent types, taking into account the flag setting
2034 on the parent subtype and any new set of discriminants.
2035
20362007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
2037
2038 * sem_ch4.adb: Minor code and comment reformatting.
2039 (Analyze_Allocator): When the designated type of an unconstrained
2040 allocator is a record with unknown discriminants or an array with
2041 unknown range bounds, emit a detailed error message depending on the
2042 compilation mode and whether the designated type is limited.
2043
20442007-10-15 Tristan Gingold <gingold@adacore.com>
2045
2046 * system-vms-ia64.ads: New file.
2047
2048 * system-vms_64.ads: Minor comment fix.
2049
20502007-10-15 Ed Schonberg <schonberg@adacore.com>
2051
2052 * sem_ch6.adb (Find_Corresponding_Spec): If the previous entity is a
2053 body generated for a function with a controlling result that is a null
2054 extension, discard the generated body in favor of the current explicit
2055 one.
2056
20572007-10-15 Ed Schonberg <schonberg@adacore.com>
2058
2059 * sem_disp.adb (Find_Controlling_Arg): Examine the call node before
2060 examining its original form, to handle properly operator calls that
2061 have been rewritten.
2062
20632007-10-15 Olivier Hainque <hainque@adacore.com>
2064
2065 * tb-alvms.c (tb_entry_t, __gnat_backtrace): Store a frame pointer
2066 instead of a procedure value in each traceback entry.
2067
2068 * g-trasym-vms-alpha.adb (Symbolic_Traceback): Pass frame pointer
2069 instead of procedure value to TBK$SYMBOLIZE.
2070
2071 * s-traent-vms.adb (PV_For): Rename as FP_For and access the proper
2072 field.
2073 (TB_Entry_For): Account for the PV/FP renaming.
2074
2075 * s-traent-vms.ads (Traceback_Entry): Rename PV component into FP and
2076 add comment.
2077 (Null_TB_Entry): Account for change of component name.
2078 (PV_For): Rename as FP_For.
2079
20802007-10-15 Tristan Gingold <gingold@adacore.com>
2081
2082 * trans.c (gnat_to_gnu): Remove the padding structure more often.
2083 This optimize assignment to over-aligned record.
2084
20852007-10-15 Emmanuel Briot <briot@adacore.com>
2086
2087 * xref_lib.adb (Get_Full_Type): Add support for the 'h' entity type, ie
2088 interfaces.
2089
2090 * xr_tabls.adb (Add_Reference): Add support for the new 'R' reference
2091 type, for dispatching calls.
2092
20932007-10-15 Vincent Celier <celier@adacore.com>
2094 Robert Dewar <dewar@adacore.com>
2095
2096 * gnat_ugn.texi: Add documentation for switches --version and --help
2097 for the GNAT tools gnatbind, gnatlink, gnatmake, gnatchop, gnatname,
2098 gnatxref, gnatfind, gnatls, and gnatclean.
2099 Document -gnatw.o.
2100 Mention attribute Excluded_Source_Dirs
2101 Replace obsolescent attribute Locally_Removed_Files with attribute
2102 Excluded_Source_Files.
2103 Improve documentation of -u (gnatbind)
2104 Document how to do reliable stack checking for the environmental task
2105 on iVMS.
2106
2107 * gnat_rm.texi: Rewrite section about No_Implicit_Dynamic_Code.
2108 Document attribute Excluded_Source_Files and indicate that attribute
2109 Locally_Removed_Files is obsolescent.
2110
21112007-10-15 Thomas Quinot <quinot@adacore.com>
2112
2113 * g-soccon-vms.ads: Fix value of MSG_WAITALL.
2114
2115 * gen-soccon.c:
2116 Update documentation to note that OpenVMS 8.3 or later must be used
2117 to generate g-soccon-vms.ads.
2118
2119 * atree.adb: Add ??? comment
2120
2121 * exp_util.adb: Minor reformatting.
2122 Add ??? comment in Kill_Dead_Code.
2123
21242007-10-15 Robert Dewar <dewar@adacore.com>
2125
2126 * errout.ads: Comment clarification
2127
2128 * exp_ch4.adb (Expand_N_Allocator): Code cleanup.
2129 (Expand_N_Op_Eq): Improve handling of array equality with -gnatVa
2130
2131 * lib.ads: Comment update
2132
2133 * init.c: Minor reformatting.
2134
2135 * sem_attr.adb: Minor formatting
2136
2137 * osint-b.ads: Minor reformatting
2138
2139 * sem_ch9.adb: Implement -gnatd.I switch
2140
2141 * g-comlin.adb: (Start): Fix handling of empty command line.
2142
2143 * gnatcmd.adb (GNATCmd): Do not put the -rules in the -cargs section,
2144 even when -rules follows the -cargs section.
2145
6524147c
OW
21462007-10-08 Ollie Wild <aaw@google.com>
2147
2148 * misc.c (LANG_HOOKS_PUSHDECL): Replaced lhd_return_tree with
2149 gnat_return_tree.
2150 (gnat_init_gcc_eh): Replaced gnat_eh_runtime_type with
2151 gnat_return_tree.
2152 (gnat_eh_runtime_type): Removed.
2153 (gnat_return_tree): New function.
2154
dff6abb2
BE
21552007-10-08 Ben Elliston <bje@au.ibm.com>
2156
2157 PR ada/33454
2158 Revert:
2159 2007-08-31 Ben Elliston <bje@au.ibm.com>
2160
2161 * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
2162 when compiling for powerpc64-*-linux.
2163 * system-linux-ppc64.ads: New file.
2164
c3048783
EB
21652007-09-27 Eric Botcazou <ebotcazou@adacore.com>
2166
2167 Mapped location support
2168 * back_end.adb (Call_Back_End): Pass information about source
2169 files instead of units to gigi.
2170 * gigi.h (struct File_Info_Type): New.
2171 (gigi): Rename and change type of number_units parameter, change
2172 type of file_info_ptr parameter.
2173 * trans.c (number_files): New global variable.
2174 (gigi): Rename and change type of number_units parameter, change
2175 type of file_info_ptr parameter.
2176 If mapped location support is enabled, create the isomorphic mapping
2177 between source files and line maps.
2178 (Sloc_to_locus): If mapped location support is enabled, translate
2179 source location into mapped location.
2180 (annotate_with_node): Rename into set_expr_location_from_node.
2181 Call set_expr_location instead of annotate_with_locus.
2182 (Pragma_to_gnu): Adjust for above change.
2183 (Loop_Statement_to_gnu): Likewise.
2184 (call_to_gnu): Likewise.
2185 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2186 (gnat_to_gnu): Likewise.
2187 (add_stmt_with_node): Likewise.
2188 (add_cleanup): Likewise.
2189 * utils.c (gnat_init_decl_processing): Do not set input_line.
2190
68b72a44
AC
21912007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
2192
2193 * sem_ch8.adb (Analyze_Use_Type): Code cleanup.
2194 (Applicable_Use): Emit a warning when a package tries to use itself.
2195 (Use_One_Type): Add variable Is_Known_Used. Emit a warning when a type
2196 is already in use or the package where it is declared is in use or is
2197 declared in the current package.
2198 (Spec_Reloaded_For_Body): New subsidiary routine for Use_One_Type.
2199
2200 * a-tasatt.adb, s-osprim-vxworks.adb, g-socthi-mingw.adb,
2201 s-intman-vms.adb, g-socket.adb, g-thread.adb, s-tarest.adb,
2202 s-tassta.adb, s-tporft.adb: Remove redundant 'use type' clause.
2203
22042007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
2205
2206 * a-calend-vms.adb, a-calend.adb:
2207 Add a section on leap seconds control along with two entities used to
2208 enable and disable leap seconds support. The array Leap_Second_Times is
2209 now constant and contains hard time values pre-generated. Remove
2210 all elaboration code used to populate the table of leap seconds.
2211
2212 * bindgen.adb:
2213 Add entity Leap_Seconds_Support to the list of global run-time variables
2214 along with a comment on its usage and values.
2215 (Gen_Adainit_Ada): Add code to generate the declaration and import of
2216 Integer variable Leap_Seconds_Support. Set its value to zero (disabled)
2217 or one (enabled) depending on the presence of binder switch "-y".
2218 (Gen_Adainit_C): Add code to generate the declaration of external int
2219 __gl_leap_seconds_support. Set is value to zero (disabled) or one
2220 (enabled) depending on the presence of binder switch "-y".
2221
2222 * init.c: Add __gl_leap_seconds_support to the list of global values
2223 computed by the binder.
2224
22252007-09-26 Jerome Guitton <guitton@adacore.com>
2226
2227 * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
2228 s-taprop-hpux-dce.adb, s-taprop-linux.adb, s-taprop-dummy.adb,
2229 s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
2230 s-taprop-posix.adb (Stop_Task): New function, dummy implementation.
2231
2232 * s-taprop.ads, s-taprop-vxworks.adb (Stop_Task): New function.
2233
2234 * s-tasdeb.adb (Stop_All_Tasks): New function, implementing a run-time
2235 function which can be called by the debugger to interrupt the tasks of
2236 an Ada application asynchronously, as needed on VxWorks.
2237 (Stop_All_Tasks_Handler): Renamed from Stop_All_Tasks.
2238
2239 * s-tasdeb.ads (Stop_All_Tasks_Handler): New function declaration,
2240 renamed from Stop_All_Tasks. Update comments.
2241 (Stop_All_tasks): New function declaration.
2242
22432007-09-26 Olivier Hainque <hainque@adacore.com>
2244
2245 * adaint.c (if defined (__Lynx__)): Wrap #def/#undef VMOS_DEV around
2246 #include <utime.h> and #define GCC_RESOURCE_H before
2247 #include <sys/wait.h>.
2248 Add more protections in __gnat_translate_vms.
2249
2250 * expect.c (if defined (__Lynx__)): #define GCC_RESOURCE_H before
2251 #include <sys/wait.h>.
2252
22532007-09-26 Thomas Quinot <quinot@adacore.com>
2254 Sergey Rybin <rybin@adacore.com>
2255
2256 * gnatvsn.ads (PCS_Version_Number, ASIS_Version_Number): Removed.
2257
2258 * exp_dist.ads (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
2259 where it belongs.
2260
2261 * opt.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.
2262
2263 * rtsfind.adb (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
2264 where it belongs.
2265
2266 * sem_dist.ads: Minor comment fix
2267
2268 * tree_io.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.
2269
22702007-09-26 Javier Miranda <miranda@adacore.com>
2271 Eric Botcazou <ebotcazou@adacore.com>
2272
2273 * a-tags.adb:
2274 (Get_HT_Link/Set_HT_Link): Updated to handle the additional level of
2275 indirection added to the HT_Link component of the TSD. This is required
2276 to statically allocate the TSD.
2277
2278 * a-tags.ads:
2279 Minor reordering of the declarations in the private part. Required to
2280 add a level of indirection to the contents of the TSD component HT_Link.
2281 This is required to statically allocate the TSD.
2282
2283 * decl.c (gnat_to_gnu_entity) <object>: Do not exclude objects with
2284 Is_Statically_Allocated set from constant objects.
2285 Do not make exported constants created by the compiler volatile.
2286 (gnat_to_gnu_param): Do not treat an IN parameter whose address is taken
2287 as read-only.
2288
2289 * trans.c (Identifier_to_gnu): For constants, unshare initializers
2290 before returning them.
2291
2292 * exp_disp.ads, exp_disp.adb (Building_Static_DT): Spec moved to the
2293 public part of the package.
2294 (Make_DT): Move HT_Link component out of the TSD record. For this
2295 purpose Make_DT now declares a separate object that stores the
2296 HT_Link value, and initializes the TSD component with the address
2297 of this new object. The addition of this level of indirection is
2298 required to statically allocate the TSD because the TSD cannot
2299 have variable components.
2300 (Expand_Interface_Conversion): Improve the expanded code.
2301 (Expand_Interface_Thunk): Set Is_Thunk in the thunk entity.
2302
2303 * sem_disp.adb (Check_Dispatching_Operation): In case of a body
2304 declaring a primitive operation ---allowed by RM 3.9.2 (13.e/2)---,
2305 if we are building static dispatch tables then we must not generate
2306 extra code to register the primitive because the dispatch table will
2307 be built at the end of the library package; otherwise we notify that
2308 we cannot build the static dispatch table.
2309
23102007-09-26 Robert Dewar <dewar@adacore.com>
2311
2312 * checks.adb, gnat1drv.adb, sem_util.ads: Improve warnings for address
2313 overlays.
2314
2315 * sem_ch13.ads, sem_ch13.adb: Improve warnings for address overlays
2316 (Analyze_Record_Representation_Clause): Suppress junk warning for
2317 missing component clause.
2318 (Analyze_Attribute_Definition_Clause, case Address): Apply the special
2319 tests for controlled type overlay to composites with controlled
2320 components.
2321 (Analyze_Record_Representation_Clause): Add reference for component name
2322
23232007-09-26 Javier Miranda <miranda@adacore.com>
2324 Gary Dismukes <dismukes@adacore.com>
2325
2326 * einfo.adb (Is_Thunk): New attribute applicable to subprograms. True
2327 for thunks associated with interface types.
2328
2329 * einfo.ads: Improve documentatation of Is_Internal
2330 (Is_Thunk): New attribute applicable to subprograms. True for thunks
2331 associated with interface types.
2332 Extensive comment fixes regarding flags that appear in all entities. The
2333 documentation is now consistent for all such flags (there were a number
2334 of errors in the documentation in this regard).
2335
2336 * exp_attr.adb (Expand_N_Attribute_Reference): Minor code cleanup.
2337
2338 * exp_ch6.adb (Make_Build_In_Place_Call_*): Return immediately if any
2339 of these procedures are passed a function call that already has
2340 build-in-place actuals (testing new flag
2341 Is_Expanded_Build_In_Place_Call). Set the flag on the function call in
2342 the case where processing continues.
2343 (Expand_Call): If the call is generated from a thunk body then we
2344 propagate the extra actuals associated with the accessibility
2345 level of the access type actuals.
2346
2347 * sem_ch6.adb (Analyze_Subprogram_Body): Set the Protected_Formal field
2348 of each extra formal of a protected operation to reference the
2349 corresponding extra formal of the subprogram denoted by the
2350 operation's Protected_Body_Subprogram.
2351
2352 * sinfo.ads, sinfo.adb (Is_Expanded_Build_In_Place_Call): New flag on
2353 N_Function_Call nodes.
2354
23552007-09-26 Robert Dewar <dewar@adacore.com>
2356
2357 * exp_ch5.adb: Activate memmove type processing if debug flag d.s is set
2358
2359 * debug.adb: Add d.s flag.
2360
23612007-09-26 Gary Dismukes <dismukes@adacore.com>
2362
2363 * exp_dbug.adb (Debug_Renaming_Declaration): Set Is_Internal on the
2364 debug variable so that it won't be initialized when pragma
2365 Initialize_Scalars is in effect.
2366
23672007-09-26 Gary Dismukes <dismukes@adacore.com>
2368
2369 * freeze.adb (Freeze_Entity): Remove check for preelaborable
2370 initialization of a full view. This is moved to
2371 Analyze_Package_Specification.
2372
2373 * sem_ch7.adb (Analyze_Package_Specification): Add check for
2374 preelaborable initialization of a full view in entity loop.
2375 (Uninstall_Declarations): If entity is a use-visible compilation unit,
2376 its child units are use-visible only if they are visible child units.
2377
2378 * sem_util.adb (Is_Preelaborable_Expression): New function to determine
2379 whether an expression can be used within a type declaration that
2380 requires preelaborable init.
2381 (Check_Components): Replace inline code that does partial checking for
2382 preelaborable default expressions with call to
2383 Is_Preelaborable_Expression.
2384 (Has_Preelaborable_Initialization): In the case of a generic actual
2385 subtype, (that is, Is_Generic_Actual is True), return the result of
2386 applying Has_Preelaborable_Initialization to the generic actual's base
2387 type.
2388
23892007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
2390
2391 * g-calend.adb (Has_53_Weeks): Rename to Last_Year_Has_53_Weeks. Add a
2392 call to Jan_1_Day _Of_Week to optimize its performance.
2393 (Is_Leap): Move the routine to the scope of Week_In_Year.
2394 (Jan_1_Day_Of_Week): New routine in Week_In_Year which calculates the
2395 weekday on which January 1 falls of Year - 1 and Year + 1. This function
2396 avoids calling Time_Of and Split, thus making it more efficent.
2397 (Week_In_Year): Reimplemented in oder to follow ISO 8601.
2398
2399 * g-calend.ads (Week_In_Year): Change comment to reflect new
2400 implementation.
2401
24022007-09-26 Emmanuel Briot <briot@adacore.com>
2403
2404 * g-comlin.ads, g-comlin.adb (Command_Line_Configuration,
2405 Command_Line): New types
2406 (Define_Alias, Define_Prefix, Free): New subprograms. These provide
2407 support for defining how switches can be grouped on a command line (as
2408 is the case for -gnatw... for GNAT), and how simple switches can be
2409 used as aliases for more complex switches (-gnatwa is same as
2410 -gnatwbcef...)
2411 (Set_Command_Line, Add_Switch, Remove_Switch): New subprogram
2412 (Start, Current_*): New subprograms
2413 Added support for parsing an array of strings in addition to the real
2414 command line.
2415 (Opt_Parser, Opt_Parser_Data): New type. As a result, some types had to
2416 be moved from the body to the private part of the spec.
2417 (*): All subprograms now have an extra parameter with default value to
2418 specify which parser should be used. For backward compatibility, it
2419 defaults to parsing the command line of the application. They were also
2420 modified to properly handle cases where each of the argument does not
2421 start at index 1 (which is always true for Ada.Command_Line, but not
2422 when processing any Argument_List).
2423 (Free): New subprogram
2424 (Internal_Initialize_Option_Scan, Find_Longuest_Matching_Switch,
2425 Argument): New subprograms
2426 (Switch_Parameter_Type): New enum, which clarifies the code. The extra
2427 special characters like ':', '=',... are now handled in a single place,
2428 which makes the code more extensible eventually.
2429 (Getopt, Full_Switch): When the switch was returned as part of the
2430 special character '*', make sure it is prepended by the switch character
2431 ('-' in general), so that the application knows whether "foo" or "-foo"
2432 was specified on the command line.
2433
24342007-09-26 Florian Villoing <villoing@adacore.com>
2435
2436 * g-dirope.adb (Remove_Dir): In case we are removing directories
2437 recursively, make sure that if an exception is raised during the
2438 processing, the current working directory is reset to its initial
2439 value before propagating the exception.
2440
24412007-09-26 Vincent Celier <celier@adacore.com>
2442
2443 * gnatbind.adb: If there are several ALI files specified and there is
2444 a main program to bind, the first ALI is expected to contain the main
2445 subprogram and the names of the binder generated files will be derived
2446 from the first ALI file name.
2447 (Gnatbind): Fix insertion character in invocation of Error_Msg
2448
24492007-09-26 Vincent Celier <celier@adacore.com>
2450
2451 * gnatcmd.adb (Check_Files): Do not include sources that have been
2452 removed by attributes Exclude_Source_Files or Locally_Removed_Files.
2453
24542007-09-26 Ed Schonberg <schonberg@adacore.com>
2455
2456 * lib-xref.ads, lib-xref.adb: The entry for array types now carries
2457 information about each of its index types, following the type
2458 reference for its component type.
2459
24602007-09-26 Vincent Celier <celier@adacore.com>
2461
2462 * make.adb: (Kill): New procedure (__gnat_kill imported)
2463 (Running_Compile, Outstanding_Compiles): Global variables that
2464 were previously local to procedure Compile_Sources.
2465 (Sigint_Intercepted): Send signal SIGINT to all outstanding
2466 compilation processes.
2467
2468 (Gnatmake): If project files are used, create the mapping of all the
2469 sources, so that the correct paths will be found.
2470
2471 * prj-env.ads, prj-env.adb (Create_Mapping): New procedure
2472
24732007-09-26 Vincent Celier <celier@adacore.com>
2474
2475 * makeutl.ads (Main_Config_Project): Moved to gpr_util.ads
2476
2477 * prj.ads, prj.adb (Default_Language): Remove function, no longer used
2478 Replace components Compiler_Min_Options and Binder_Min_Options with
2479 Compiler_Required_Switches and Binder_Required_Switches in record
2480 Language_Config.
2481 Remove components Default_Language and Config in Project_Tree_Data,
2482 no longer used.
2483
2484 * prj-attr.adb: New attributes Required_Switches (<language>) in
2485 packages Compiler and Binder.
2486
2487 * prj-nmsc.adb: Major rewrite of the processing of configuration
2488 attributes for gprbuild. No impact on GNAT tools.
2489
2490 * prj-proc.ads, prj-proc.adb (Process_Project_Tree_Phase_2): No longer
2491 process configuration attributes: this is done in Prj.Nmsc.Check.
2492 (Recursive_Process): Make a full copy of packages inherited from project
2493 being extended, instead of a shallow copy.
2494 (Process_Project_Tree_Phase_1): New procedure
2495 (Process_Project_Tree_Phase_1): New procedure
2496 (Process): Implementation now uses the two new procedures
2497
2498 * prj-util.adb (Executable_Of): Get the suffix and the default suffix
2499 from the project config, not the tree config that no longer exists.
2500
25012007-09-26 Vincent Celier <celier@adacore.com>
2502
2503 * Make-lang.in: Update dependencies..
2504
25052007-09-26 Vincent Celier <celier@adacore.com>
2506
2507 * osint.adb, osint.ads: Minor reformatting
2508
2509 * osint-b.adb, osint-b.ads (Set_Current_File_Name_Index): New procedure
2510
25112007-09-26 Gary Dismukes <dismukes@adacore.com>
2512
2513 * par-ch4.adb (P_Record_Or_Array_Component_Association): Change Ada 95
2514 message to cite use of <> in aggregate component associations rather
2515 than wrongly indicating use of limited aggregates.
2516
25172007-09-26 Robert Dewar <dewar@adacore.com>
2518
2519 * sem_attr.adb (Analyze_Access_Attribute): Fix missing set of
2520 Address_Taken.
2521
25222007-09-26 Ed Schonberg <schonberg@adacore.com>
2523
2524 * sem_ch3.adb (Derive_Subprograms): If the interface parent is a direct
2525 ancestor of the derived type, the operations are inherited from the
2526 primary dispatch table of the parent.
2527 (OK_For_Limited_Init_In_05): Remove old comment. Reject in-place calls
2528 when the context is an explicit type conversion.
2529
25302007-09-26 Ed Schonberg <schonberg@adacore.com>
2531
2532 * sem_ch4.adb (Analyze_Qualified_Expression): Apply name resolution
2533 rule for qualified expressions properly, to detect improper conversions
2534 and resolve some cases of overloading.
2535
25362007-09-26 Ed Schonberg <schonberg@adacore.com>
2537
2538 * sem_res.adb (Resolve_Call): If the call is dispatching, generate the
2539 proper kind of reference to the primitive operation, for better source
2540 navigation.
2541 (Valid_Conversion): A tagged conversion is legal if both operands are
2542 tagged.
2543
25442007-09-26 Robert Dewar <dewar@adacore.com>
2545
2546 * sem_warn.adb (Check_References): Catch more cases of unreferenced
2547 packages.
2548
25492007-09-26 Vincent Celier <celier@adacore.com>
2550
2551 * snames.adb, snames.ads: Change Include_Option to Include_Switches
2552
25532007-09-26 Robert Dewar <dewar@adacore.com>
2554
2555 * s-wchstw.adb: provide messages for run time unit exceptions
2556
2557 * a-witeio.adb: Minor reformatting
2558
2559 * exp_ch13.adb: Minor reformatting
2560
25612007-09-26 Sergey Rybin <rybin@adacore.com>
2562
2563 * vms_data.ads: Revise gnatmetric qualifiers.
2564 Add qualified for the new gnatbind option '-y'
2565
2566 * gnat_ugn.texi: Revise the gnatmetric section.
2567 Add entry for new gnatbind option '-y'.
2568
2569 * gnat_rm.texi: Minor spelling correction.
2570 Document restriction on overlaying controlled types
2571
25722007-09-26 Vincent Celier <celier@adacore.com>
2573
2574 * makegpr.adb (Link_Executables): Do not fail when the root project has
2575 no sources, but is an extending project.
2576
0a86bcc9
EB
25772007-09-25 Eric Botcazou <ebotcazou@adacore.com>
2578
2579 * trans.c: Fix misplaced #define.
2580
b235734c
EB
25812007-09-22 Eric Botcazou <ebotcazou@adacore.com>
2582
2583 * utils2.c (build_unary_op) <ADDR_EXPR> [INDIRECT_REF]: Propagate
2584 the TYPE_REF_CAN_ALIAS_ALL flag to the result.
2585
97237784
OH
25862007-09-21 Olivier Hainque <hainque@adacore.com>
2587
2588 * utils.c (type_for_nonaliased_component_p): Return false for
2589 all AGGREGATE_TYPEs.
2590
2adde4ff
EB
25912007-09-17 Eric Botcazou <ebotcazou@adacore.com>
2592
2593 * decl.c (gnat_to_gnu_entity) <object>: Make again the type of an
2594 object covered by 13.3(19) volatile.
2595
b693daa7
EB
25962007-09-12 Eric Botcazou <ebotcazou@adacore.com>
2597
2598 PR ada/26797
2599 PR ada/32407
2600 * utils.c (unchecked_convert): Use a subtype as the intermediate type
2601 in the special VIEW_CONVERT_EXPR case.
2602
82da9a90
AC
26032007-09-12 Robert Dewar <dewar@adacore.com>
2604
2605 * types.ads, a-charac.ads, freeze.adb: Minor reformatting.
2606
2607 * a-except.adb, g-hesora.adb, g-speche.adb, lib.adb, lib.ads,
2608 lib-load.adb, lib-writ.adb, s-assert.adb, s-carun8.adb,
2609 s-casuti.adb, s-crc32.adb, s-exctab.adb, s-htable.adb, s-imgenu.adb,
2610 s-mastop.adb, s-memory.adb, s-memory.ads, s-secsta.adb, s-soflin.adb,
2611 s-sopco3.adb, s-sopco4.adb, s-sopco5.adb, s-stache.adb, s-stalib.adb,
2612 s-stoele.adb, s-strcom.adb, s-strops.adb, s-traceb.adb, s-traent.adb,
2613 s-wchcnv.adb, s-wchcon.adb, s-wchjis.adb, s-addope.adb, s-except.adb,
160c5065 2614 s-os_lib.adb, s-string.adb, s-utf_32.adb, a-elchha.adb,
82da9a90
AC
2615 a-chlat1.ads, a-elchha.ads, a-except.ads, g-hesora.ads, g-htable.ads,
2616 g-speche.ads, par-prag.adb, restrict.adb, restrict.ads, s-assert.ads,
2617 s-carun8.ads, s-casuti.ads, s-crc32.ads, sem_ch11.adb, sem_prag.adb,
2618 s-exctab.ads, s-htable.ads, s-imgenu.ads, s-mastop.ads, snames.adb,
2619 snames.ads, snames.h, s-purexc.ads, s-secsta.ads, s-soflin.ads,
2620 s-sopco3.ads, s-sopco4.ads, s-sopco5.ads, s-stache.ads, s-stalib.ads,
2621 s-stoele.ads, s-strcom.ads, s-strops.ads, s-traceb.ads, s-traent.ads,
2622 s-unstyp.ads, s-wchcnv.ads, s-wchcon.ads, s-wchjis.ads, s-addope.ads,
2623 s-except.ads, s-os_lib.ads, s-string.ads, s-utf_32.ads: Implement
2624 pragma Compiler_Unit and adds it to relevant library units.
2625
26262007-09-12 Ed Schonberg <schonberg@adacore.com>
2627
2628 * sem_aggr.adb (Resolve_Record_Aggregate): An others association with
2629 a box need not correspond to any component.
2630
26312007-09-12 Robert Dewar <dewar@adacore.com>
2632
2633 * g-thread.ads: Document use of "with GNAT.Threads" to ensure loading
2634 the tasking version of the Ada run time when foreign threads are
2635 present and there are no explicit Ada tasks or tasking constructs.
2636
2637 * gnat_rm.texi: Clarify documentation of GNAT.Threads.
2638
26392007-09-12 Hristian Kirtchev <kirtchev@adacore.com>
2640
2641 * bindusg.adb (Display): Correct comment for switch -X. Add a line for
2642 the usage of switch -y.
2643
2644 * switch-b.adb (Scan_Binder_Switches): Set flag Leap_Seconds_Support
2645 when switch -y is present.
2646
2647 * opt.ads: Add binder flag Leap_Seconds_Support used to enable/disable
2648 leap seconds in Ada.Calendar and its children.
2649
26502007-09-12 Jose Ruiz <ruiz@adacore.com>
2651
2652 * a-extiti.ads (Timer): The discriminant is a "not null access
2653 constant" in the Reference Manual.
2654 (Cancel_Handler): Cancelled is an out parameter in the Reference Manual.
2655
26562007-09-12 Robert Dewar <dewar@adacore.com>
2657
2658 * a-swuwha.adb: Remove junk RM header
2659
26602007-09-12 Vincent Celier <celier@adacore.com>
2661
2662 * g-bytswa-x86.adb (Swap2, Swap4, Swap8): Remove explicit "in" mode
2663 indicator
2664
2665 * g-bytswa.ads: Minor reformatting
2666
26672007-09-12 Thomas Quinot <quinot@adacore.com>
2668
2669 * g-soccon-solaris-64.ads, g-soccon-hpux-ia64.ads:
2670 Add new constant Thread_Blocking_IO, always True by default, set False
2671 on a per-runtime basis.
2672 (Need_Netdb_Buffer): New constant.
2673
26742007-09-12 Arnaud Charlet <charlet@adacore.com>
2675
2676 * s-dsaser.ads (Get_Local_Partition_Id, Get_Passive_Partition_Id):
2677 Added renames for corresponding functions in System.Partition_Interface.
2678
26792007-09-12 Doug Rupp <rupp@adacore.com>
2680
2681 * Makefile.in: Remove VMS specific System.CRTL packages which are no
2682 longer needed.
2683
2684 * s-crtl-vms64.ads: Removed.
2685
09528ed9
OH
26862007-09-12 Olivier Hainque <hainque@adacore.com>
2687
2688 * decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: For a subtype
2689 with discriminant constraints, generalize the code for BIT_FIELDs
2690 to PACKED fields of constant size and propagate DECL_PACKED.
2691
fa89b6ec
EB
26922007-09-11 Eric Botcazou <ebotcazou@adacore.com>
2693
2694 * decl.c (array_type_has_nonaliased_component): New predicate.
2695 (gnat_to_gnu_field) <E_Array_Type>: Invoke the above predicate to
2696 set the TYPE_NONALIASED_COMPONENT flag on the type.
2697 <E_Array_Subtype>: Likewise.
2698 * gigi.h (type_for_nonaliased_component_p): Declare.
2699 * utils.c (type_for_nonaliased_component_p): New predicate.
2700 (create_field_decl): Invoke the above predicate to set the
2701 DECL_NONADDRESSABLE_P flag on the field.
2702
e18d6a15
JM
27032007-09-11 Javier Miranda <miranda@adacore.com>
2704
2705 * einfo.ads, einfo.adb (Dispatch_Table_Wrapper): New attribute. Present
2706 in library level record type entities if we are generating statically
2707 allocated dispatch tables.
2708
2709 * exp_disp.adb (Make_Tags/Make_DT): Replace previous code
2710 importing/exporting the _tag declaration by new code
2711 importing/exporting the dispatch table wrapper. This change allows us
2712 to statically allocate of the TSD.
2713 (Make_DT.Export_DT): New procedure.
2714 (Build_Static_DT): New function.
2715 (Has_DT): New function.
2716
2717 * freeze.adb (Freeze_Static_Object): Code cleanup: Do not reset flags
2718 True_Constant and Current_Value. Required to statically
2719 allocate the dispatch tables.
2720 (Check_Allocator): Make function iterative instead of recursive.
2721 Also return inner allocator node, when present, so that we do not have
2722 to look for that node again in the caller.
2723
e89d6010
JH
27242007-09-11 Jan Hubicka <jh@suse.cz>
2725
2726 * misc.c (gnat_expand_body): Kill.
2727 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2728
281b604e
AC
27292007-09-10 Robert Dewar <dewar@adacore.com>
2730
2731 * exp_atag.ads, exp_atag.adb, mlib-tgt-tru64.adb, mlib-tgt-aix.adb,
2732 mlib-tgt-irix.adb, mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
2733 mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
2734 mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, ali.adb, ali.ads,
2735 ali-util.adb, ali-util.ads, atree.h, back_end.adb, back_end.ads,
2736 bcheck.adb, bcheck.ads, binde.adb, binde.ads, binderr.adb, binderr.ads,
2737 bindgen.adb, bindgen.ads, bindusg.adb, bindusg.ads, butil.adb,
2738 butil.ads, checks.adb, checks.ads, clean.adb, clean.ads, comperr.adb,
2739 comperr.ads, cstand.adb, cstand.ads, debug_a.adb, debug_a.ads,
2740 elists.h, errout.adb, erroutc.ads, errutil.adb, errutil.ads,
2741 err_vars.ads, eval_fat.adb, eval_fat.ads, exp_sel.ads, exp_sel.adb,
2742 exp_aggr.adb, exp_aggr.ads, expander.adb, expander.ads, exp_attr.ads,
2743 exp_ch10.ads, exp_ch11.adb, exp_ch12.adb, exp_ch12.ads, exp_ch13.adb,
2744 exp_ch13.ads, exp_ch2.adb, exp_ch2.ads, exp_ch3.ads, exp_ch4.adb,
2745 exp_ch4.ads, exp_ch5.adb, exp_ch5.ads, exp_ch6.adb, exp_ch6.ads,
2746 exp_ch7.adb, exp_ch7.ads, exp_ch8.adb, exp_ch8.ads, exp_ch9.adb,
2747 exp_ch9.ads, exp_code.adb, exp_code.ads, exp_dbug.adb, exp_dbug.ads,
2748 exp_disp.ads, exp_dist.adb, exp_dist.ads, exp_fixd.adb, exp_fixd.ads,
2749 exp_imgv.adb, exp_imgv.ads, exp_intr.adb, exp_intr.ads, exp_pakd.adb,
2750 exp_pakd.ads, exp_prag.adb, exp_prag.ads, exp_smem.adb, exp_strm.adb,
2751 exp_strm.ads, exp_tss.adb, exp_tss.ads, exp_util.adb, exp_util.ads,
2752 exp_vfpt.adb, exp_vfpt.ads, fmap.adb, fmap.ads, fname-sf.adb,
2753 fname-sf.ads, fname-uf.adb, fname-uf.ads, frontend.adb, frontend.ads,
2754 get_targ.adb, get_targ.ads, gnat1drv.adb, gnat1drv.ads, gnatbind.adb,
2755 gnatbind.ads, gnatbl.c, gnatchop.adb, gnatclean.adb, gnatcmd.adb,
2756 gnatcmd.ads, gnatdll.adb, gnatfind.adb, gnatkr.adb, gnatkr.ads,
2757 gnatlbr.adb, gnatlink.adb, gnatlink.ads, gnatls.adb, gnatls.ads,
2758 gnatmake.adb, gnatmake.ads, gnatmem.adb, gnatname.adb, gnatname.ads,
2759 gnatprep.adb, gnatprep.ads, gnatsym.adb, gnatxref.adb,
2760 gprep.adb, gprep.ads, hlo.adb, hlo.ads, impunit.adb, impunit.ads,
2761 inline.adb, inline.ads, itypes.adb, itypes.ads, layout.adb, layout.ads,
2762 lib-load.adb, lib-load.ads, lib-util.adb, lib-util.ads, lib-writ.adb,
2763 lib-writ.ads, lib-xref.adb, lib-xref.ads, live.adb, live.ads,
2764 make.adb, make.ads, makeutl.ads, makeutl.adb, makeusg.adb, makeusg.ads,
2765 mdll.adb, mdll.ads, mdll-fil.adb, mdll-fil.ads, mdll-utl.adb,
2766 mdll-utl.ads, memroot.adb, memroot.ads, mlib.adb, mlib.ads,
2767 mlib-fil.adb, mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb,
2768 mlib-tgt.ads, mlib-utl.adb, mlib-utl.ads, namet.h, nmake.adt,
2769 osint.adb, osint.ads, osint-b.adb, osint-b.ads, osint-c.adb,
2770 osint-c.ads, osint-l.adb, osint-l.ads, osint-m.adb, osint-m.ads,
2771 par.adb, par.ads, par-ch10.adb, par-ch11.adb, par-ch12.adb,
2772 par-ch13.adb, par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
2773 par-ch6.adb, par-ch7.adb, par-ch8.adb, par-ch9.adb, par-endh.adb,
2774 par-labl.adb, par-load.adb, par-prag.adb, par-sync.adb, par-tchk.adb,
2775 par-util.adb, prep.adb, prep.ads, prepcomp.adb, prepcomp.ads,
2776 prj.adb, prj.ads, prj-attr.adb, prj-attr.ads, prj-com.ads,
2777 prj-dect.adb, prj-dect.ads, prj-err.adb, prj-err.ads, prj-ext.adb,
2778 prj-ext.ads, prj-makr.adb, prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads,
2779 prj-pars.adb, prj-pars.ads, prj-part.adb, prj-part.ads,
2780 prj-pp.adb, prj-pp.ads, prj-proc.adb, prj-proc.ads,
2781 prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
2782 prj-util.adb, prj-util.ads, restrict.adb, restrict.ads,
2783 rtsfind.adb, rtsfind.ads, scn.adb, scn.ads,
2784 scng.adb, scng.ads, sdefault.ads, sem.ads, sem_aggr.ads, sem_attr.adb,
2785 sem_case.adb, sem_case.ads, sem_cat.adb, sem_cat.ads, sem_ch10.adb,
2786 sem_ch10.ads, sem_ch11.adb, sem_ch11.ads, sem_ch12.ads, sem_ch13.adb,
2787 sem_ch13.ads, sem_ch2.adb, sem_ch2.ads, sem_ch3.adb, sem_ch3.ads,
2788 sem_ch4.ads, sem_ch5.adb, sem_ch5.ads, sem_ch6.adb, sem_ch6.ads,
2789 sem_ch7.adb, sem_ch7.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
2790 sem_ch9.ads, sem_disp.adb, sem_disp.ads, sem_dist.adb, sem_dist.ads,
2791 sem_elab.adb, sem_elab.ads, sem_elim.adb, sem_elim.ads, sem_eval.adb,
2792 sem_eval.ads, sem_intr.adb, sem_intr.ads, sem_maps.adb, sem_maps.ads,
2793 sem_mech.adb, sem_mech.ads, sem_prag.adb, sem_prag.ads, sem_res.adb,
2794 sem_res.ads, sem_smem.adb, sem_smem.ads, sem_type.adb, sem_type.ads,
2795 sem_util.adb, sem_util.ads, sem_vfpt.adb, sem_vfpt.ads, sem_warn.adb,
2796 sem_warn.ads, sfn_scan.ads, sinfo-cn.adb, sinfo-cn.ads, sinput-c.adb,
2797 sinput-c.ads, sinput-d.adb, sinput-d.ads, sinput-l.adb, sinput-l.ads,
2798 sinput-p.adb, sinput-p.ads, snames.h, sprint.adb, sprint.ads,
2799 stringt.h, style.ads, styleg.adb, styleg.ads, styleg-c.adb,
2800 styleg-c.ads, stylesw.adb, stylesw.ads, switch.adb, switch.ads,
2801 switch-b.adb, switch-b.ads, switch-c.adb, switch-c.ads, switch-m.adb,
2802 switch-m.ads, symbols.adb, symbols.ads, targparm.adb, tbuild.adb,
2803 tbuild.ads, tempdir.adb, tempdir.ads, tree_gen.adb, tree_gen.ads,
2804 treepr.adb, treepr.ads, treeprs.adt, ttypef.ads, ttypes.ads,
2805 types.h, uintp.h, urealp.h, usage.adb, usage.ads,
2806 validsw.adb, validsw.ads, vxaddr2line.adb, xeinfo.adb, xnmake.adb,
2807 xref_lib.adb, xref_lib.ads, xr_tabls.adb, xr_tabls.ads, xsinfo.adb,
2808 xtreeprs.adb, xsnames.adb, vms_conv.ads, vms_conv.adb, xgnatugn.adb,
2809 gprmake.adb, makegpr.ads, makegpr.adb, prj-attr-pm.ads, prj-attr-pm.adb,
2810 mlib-tgt-lynxos.adb, mlib-tgt-darwin.adb, symbols-vms.adb,
2811 symbols-processing-vms-alpha.adb, symbols-processing-vms-ia64.adb,
2812 mlib-tgt-specific.adb, mlib-tgt-specific.ads, mlib-tgt-vms.adb,
2813 mlib-tgt-vms.ads: Replace headers with GPL v3 headers.
2814
28152007-09-10 Emmanuel Briot <briot@adacore.com>
2816
2817 * s-regpat.adb (Parse_Character_Class): Fix handling of empty character
2818 classes ("[]").
2819
28202007-09-10 Vasiliy Fofanov <fofanov@adacore.com>
2821
2822 * adaint.c (__gnat_translate_vms): new function.
2823
28242007-09-10 Gary Dismukes <dismukes@adacore.com>
2825 Thomas Quinot <quinot@adacore.com>
2826
2827 * exp_ch3.adb (Predef_Spec_Or_Body): When the type is abstract, only
2828 create an abstract subprogram in the case of 'Input. For 'Output we now
2829 create a real spec/body when the type is abstract, since it can
2830 potentially be called.
2831 (Predefined_Primitive_Bodies): Now allow the creation of a predefined
2832 body for 'Output when the type is abstract (only the creation of the
2833 body for 'Input is excluded when the type is abstract).
2834 (Stream_Operation_OK): Add an additional condition in the return
2835 statement, so that False will be returned for TTS_Stream_Input if the
2836 associated tagged type is an abstract extension. Add comments for
2837 return statement.
2838 (Expand_N_Object_Declaration): For the case of a shared passive
2839 variable, insert init proc call only after the shared variable
2840 procedures have been processed, because the IP call needs to undergo
2841 shared passive variable reference expansion, which requires these
2842 procedures to be available (and elaborated).
2843
28442007-09-10 Vincent Celier <celier@adacore.com>
2845
2846 * prj-env.ads, prj-env.adb (Create_Mapping_File (Language)): Remove
2847 parameter Runtime_Project.
2848
28492007-09-10 Ed Schonberg <schonberg@adacore.com>
2850
2851 * sem_aggr.adb (Build_Record_Aggr_Code): If an aggregate component is
2852 given a box association, the type of the component is discriminated,
2853 and the value of the discriminant is the discriminant of the enclosing
2854 type, retrieve its value from the aggregate itself, where it must have
2855 been supplied.
2856
2857 * sem_ch4.adb (Analyze_One_Call): Further refinement to previous fix,
2858 to remove other spurious ambiguities on arithmetic operations involving
2859 literals and addresses, on systems where Address is a visible integer
2860 type, when the operator is called in functional notation.
2861 (Try_Primitive_Operation): Within an instance, a call in prefixed form
2862 is legal when the types match, even if the operation is currently
2863 hidden.
2864
28652007-09-10 Ed Schonberg <schonberg@adacore.com>
2866
2867 * sem_ch12.adb (Build_Local_Package): A formal package with no
2868 associations is legal if all formals have defaults. It is not
2869 equivalent to a formal declared with a box.
2870
28712007-09-10 Sergey Rybin <rybin@adacore.com>
2872
2873 * vms_data.ads: Add qualifier for the new gnatmetric '-lratio' option
2874
28752007-09-10 Sergey Rybin <rybin@adacore.com>
2876
2877 * gnat_ugn.texi: Add description of the new '-lratio' option
2878 Update 7.3.1 section about availability of the feature.
2879
28802007-09-10 Thomas Quinot <quinot@adacore.com>
2881
2882 * exp_smem.ads, exp_smem.adb (Make_Shared_Var_Procs): Return last
2883 inserted node.
2884
28852007-09-10 Olivier Hainque <hainque@adacore.com>
2886
2887 * Makefile.in: (mips-irix section): Activate build of libgmem.
2888
a56955b1
EB
28892007-09-10 Eric Botcazou <ebotcazou@adacore.com>
2890
2891 * a-numaux-x86.adb (Logarithmic_Pow): Do not silently clobber
2892 x87 registers.
2893
c03550f6
EB
28942007-09-10 Eric Botcazou <ebotcazou@adacore.com>
2895
2896 * decl.c (gnat_to_gnu_entity) <object>: Deal with variable built for
2897 a debug renaming declaration specially.
2898
79646678
EB
28992007-09-08 Eric Botcazou <ebotcazou@adacore.com>
2900
2901 * decl.c (gnat_to_gnu_entity) <Object>: Simplify the condition under
2902 which a constant renaming is treated as a normal object declaration.
2903 * trans.c (lvalue_required_p) <N_Slice>: New case, extracted from
2904 the N_Indexed_Component case.
2905 <N_Indexed_Component>: Fall through to above case.
2906 <N_Object_Renaming_Declaration>: Return true for all composite types.
2907
d9e161ce
EB
29082007-09-08 Eric Botcazou <ebotcazou@adacore.com>
2909
2910 * decl.c (make_packable_type): If the new type has been given BLKmode,
2911 try again to get an integral mode for it.
2912
0ab29e91 29132007-09-07 Eric Botcazou <ebotcazou@adacore.com>
6ef9a246 2914
0ab29e91 2915 Re-apply accidentally reverted change:
6ef9a246 2916
0ab29e91 2917 2007-02-07 Andreas Krebbel <krebbel1@de.ibm.com>
6ef9a246 2918
0ab29e91
EB
2919 * raise-gcc.c (get_region_description_for, get_call_site_action_for,
2920 get_action_description_for): Replace _Unwind_Word with _uleb128_t
2921 and _Unwind_SWord with _sleb128_t.
4b459ae4 2922
38f1f8cb
EB
29232007-09-06 Eric Botcazou <ebotcazou@adacore.com>
2924
2925 * trans.c (convert_with_check): Update call to real_2expN.
2926
db2960f4
SL
29272007-09-05 Sandra Loosemore <sandra@codesourcery.com>
2928
2929 * trans.c (Compilation_unit_to_gnu): Use set_cfun.
2930 * utils.c (end_subprog_body): Likewise.
2931
d70c0bd6
NC
29322007-09-03 Nick Clifton <nickc@redhat.com>
2933
2934 * Make-lang.in: Change copyright header to refer to version 3 of
2935 the GNU General Public License and to point readers at the
2936 COPYING3 file and the FSF's license web page.
2937 * ada-tree.def, nmake.adt, nlists.h, snames.h, utils.c,
2938 Makefile.rtl, Makefile.in, config-lang.in, uintp.h, urealp.h,
2939 namet.h, decl.c, utils2.c, lang.opt, elists.h, atree.h, types.h,
2940 treeprs.adt, lang-specs.h, cuintp.c, stringt.h, gnatbl.c:
2941 Likewise.
2942
8a26ebb6
AC
29432007-08-31 Vincent Celier <celier@adacore.com>
2944
2945 PR ada/4720
2946
2947 * gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb,
2948 gnatname.adb, gnatxref.adb, gprep.adb, clean.adb gnatbind.adb
2949 (Check_Version_And_Help): New procedure in package Switch to process
2950 switches --version and --help.
2951 Use Check_Version_And_Help in GNAT tools
2952
2953 * make.adb: Ditto.
2954 (Compile_Sources): Make sure that sources that are "excluded" are not
2955 compiled.
2956 (Gnatmake): Do not issue -aO. to gnatbind and only issue -I- if a
2957 project file is used.
2958 (Version_Switch): Remove, moved to Switch
2959 (Help_Switch): Remove, moved to Switch
2960 (Display_Version): Remove, moved to Switch
2961
2962 * switch.ads, switch.adb (Check_Version_And_Help): New procedure in
2963 package Switch to process switches --version and --help.
2964 (Display_Version): New procedure
2965
2966 * gnatvsn.ads, gnatvsn.adb (Copyright_Holder): New function.
2967
29682007-08-31 Javier Miranda <miranda@adacore.com>
2969
2970 * a-tags.adb (Internal_Tag): Protect the run-time against wrong
2971 internal tags.
2972
29732007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2974
2975 * checks.adb (In_Declarative_Region_Of_Subprogram_Body): New routine.
2976 (Mark_Non_Null): If the node for which we just generated an access check
2977 is a reference to an *in* parameter and the reference appears in the
2978 declarative part of a subprogram body, mark the node as known non null.
2979
29802007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2981
2982 * einfo.ads, einfo.adb: New flag Is_Raised (Flag224). Update the
2983 structure of E_Exception to reflect the new flag.
2984 (Is_Raised, Set_Is_Raised): New inlined routines.
2985 Update the usage of available flag to reflect the addition of Is_Raised.
2986 (Is_Raised, Set_Is_Raised): Bodies of new routines.
2987 (Write_Entity_Flags): Write the status of flag Is_Raised.
2988 (Is_Descendent_Of_Address): New entity flag, to simplify handling of
2989 spurious ambiguities when integer literals appear in the context of an
2990 address type that is a visible integer type.
2991
2992 * sem_ch11.adb (Analyze_Exception_Handler): Add code to warn on local
2993 exceptions never being raised.
2994 (Analyze_Raise_Statement): When analyzing an exception, mark it as being
2995 explicitly raised.
2996
29972007-08-31 Javier Miranda <miranda@adacore.com>
2998
2999 * exp_ch11.adb (Expand_At_End_Handler): Avoid generation of raise
3000 statement when compiling under restriction No_Exceptions_Proparation.
3001
30022007-08-31 Ed Schonberg <schonberg@adacore.com>
3003
3004 * exp_ch3.adb (Build_Record_Init_Proc): If there is a static
3005 initialization aggregate for the type, generate itype references for
3006 thetypes of its (sub)components, to prevent out-of-scope errors in gigi.
3007
30082007-08-31 Gary Dismukes <dismukes@adacore.com>
3009
3010 * exp_ch8.adb (Expand_N_Package_Renaming_Declaration): In the case of a
3011 library-level package renaming, pass the declaration associated with
3012 the renaming's special debug variable to Qualify_Entity_Names to ensure
3013 that its encoded name is properly qualified.
3014
3015 * exp_dbug.adb (Qualify_All_Entity_Names): Check for a variable entity
3016 occurring in the list of entities to qualify, and do not attempt to
3017 traverse an entity list in that case. Variables associated with
3018` library-level package renamings can now occur in the table.
3019
3020 * exp_dbug.ads: Revise documentation of the encoding for renaming
3021 declarations.
3022
30232007-08-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3024
3025 * layout.adb (Layout_Type): Use Underlying_Type to determine whether an
3026 access type points to an unconstrained array.
3027
30282007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3029
3030 * restrict.adb, namet.adb, par-util.adb: Remove redundant type
3031 conversion.
3032
3033 * sem_res.adb (Resolve_Qualified_Expression): Add machinery to detect
3034 simple redundant qualifications. The check is performed whenever the
3035 expression is a non-overloaded identifier.
3036 (Resolve_Type_Conversion): Enchance the redundant type conversion check
3037 to include loop parameters.
3038 (Valid_Conversion): Avoid generation of spurious error message.
3039
30402007-08-31 Bob Duff <duff@adacore.com>
3041
3042 * par-ch4.adb (P_Simple_Expression): Fold long sequences of
3043 concatenations of string literals into a single literal, in order to
3044 avoid very deep recursion in the front end, which was causing stack
3045 overflow.
3046
3047 * sem_eval.adb (Eval_Concatenation): If the left operand is the empty
3048 string, and the right operand is a string literal (the case of "" &
3049 "..."), optimize by avoiding copying the right operand -- just use the
3050 value of the right operand directly.
3051
3052 * stringt.adb (Store_String_Chars): Optimize by growing the
3053 String_Chars table all at once, rather than appending characters one by
3054 one.
3055 (Write_String_Table_Entry): If the string to be printed is very long,
3056 just print the first few characters, followed by the length. Otherwise,
3057 doing "pn(n)" in the debugger can take an extremely long time.
3058
3059 * sem_prag.adb (Process_Interface_Name): Replace loop doing
3060 Store_String_Char with Store_String_Chars.
3061
30622007-08-31 Vincent Celier <celier@adacore.com>
3063
3064 * prj-attr.adb: Add new attribute Excluded_Source_Files
3065
3066 * prj-nmsc.adb: Use attribute Excluded_Source_Files before
3067 Locally_Removed_Files.
3068
3069 * snames.ads, snames.adb: New standard name Excluded_Source_Files
3070
30712007-08-31 Ed Schonberg <schonberg@adacore.com>
3072
3073 * sem_ch10.adb (Analyze_Subunit_Context): When analyzing context
3074 clauses of subunits, ignore limited_with_clauses that are illegal and
3075 have not been fully analyzed.
3076
30772007-08-31 Ed Schonberg <schonberg@adacore.com>
3078
3079 * sem_ch3.adb: The predicate Is_Descendent_Of_Address is now an entity
3080 flag, for effiency. It is called when analyzing arithmetic operators
3081 and also for actuals in calls that are universal_integers. The flag is
3082 set for the predefined type address, and for any type or subtype
3083 derived from it.
3084
3085 * sem_ch4.adb (Analyze_One_Call): Reject an actual that is a
3086 Universal_Integer, when the formal is a descendent of address and the
3087 call appears in user code.
3088 (Analyze_Selected_Component): if the prefix is a private extension, the
3089 tag component is visible.
3090
3091 * sem_util.ads, sem_util.adb: Remove Is_Descendent_Of_Address, now an
3092 entity flag.
3093
30942007-08-31 Robert Dewar <dewar@adacore.com>
3095
3096 * s-fileio.adb (Open): Normalize file name to lower case in non-case
3097 sensitive file name systems to avoid unexpected mismatch in Vista.
3098
30992007-08-31 Vincent Celier <celier@adacore.com>
3100
3101 * tempdir.adb: On VMS, take into account GNUTMPDIR before TMPDIR
3102
31032007-08-31 Vincent Celier <celier@adacore.com>
3104
3105 * symbols-vms.adb (Initialize): Read symbol files with continuation
3106 lines
3107 (Finalize): If symbol is long, split the line
3108
31092007-08-31 Vincent Celier <celier@adacore.com>
3110
3111 * fmap.ads: Minor comment updates
3112
31132007-08-31 GNAT Script <nobody@adacore.com>
3114
3115 * Make-lang.in: Makefile automatically updated
3116
31172007-08-31 Bob Duff <duff@adacore.com>
3118
3119 * sinfo.ads: Minor comment fix.
3120
31212007-08-31 Thomas Quinot <quinot@adacore.com>
3122
3123 * stand.ads: (Standard_Debug_Renaming_Type): Make comment consistent
3124 with implementation.
3125 Documentation cleanup only.
3126
31272007-08-31 Sergey Rybin <rybin@adacore.com>
3128
3129 * vms_data.ads: Add new qualifier /STMT_NAME_ON_NEW_LINE for the new
3130 gnatpp '--separate-stmt-name' option.
3131 Add new qualifier /USE_ON_NEW_LIN for the new gnatpp '--use-on-new-line'
3132 option.
3133
3134 * gnat_ugn.texi: Add description for the new gnatpp
3135 '--separate-stmt-name' and '--use-on-new-line' options.
3136
22d2aa96
BE
31372007-08-31 Ben Elliston <bje@au.ibm.com>
3138
3139 * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
3140 when compiling for powerpc64-*-linux.
3141 * system-linux-ppc64.ads: New file.
3142
51743df8
KW
31432007-08-22 Krister Walfridsson <cato@df.lth.se>
3144
3145 * env.c ( __gnat_clearenv): Use the __gnat_unsetenv mechanism for
3146 NetBSD.
3147
ac7d7749
KG
31482007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3149
3150 * misc.c (gnat_type_max_size): Constify.
3151
833eddff
AC
31522007-08-16 Gary Dismukes <dismukes@adacore.com>
3153
3154 * cstand.adb (Create_Standard): Create an entity for a zero-sized type
3155 associated with Standard_Debug_Renaming_Type, to be used as the type of
3156 the special variables whose names provide debugger encodings for
3157 renaming declarations.
3158
3159 * einfo.ads, einfo.adb (Debug_Renaming_Link): Change to return Node25.
3160 (Set_Debug_Renaming_Link): Change to set Node25.
3161 (Write_Field13_Name): Remove case for E_Enumeration_Literal.
3162 (Write_Field25_Name): Add case for E_Variable to output
3163 "Debug_Renaming_Link".
3164 (Write_Field23_Name): Correct the output string for "Limited_View".
3165
3166 * exp_dbug.adb: Add with and use of Tbuild.
3167 (Debug_Renaming_Declaration): Replace creation of an enumeration type
3168 and literal with creation of a variable of type
3169 Standard_Debug_Renaming_Type whose name encodes both the renamed object
3170 and the entity of the renaming declaration.
3171 (Qualify_Entity_Name): Add the delayed qualification of the entity name
3172 part of the name of a variable that has a Debug_Renaming_Link.
3173
3174 * stand.ads (Standard_Debug_Renaming_Type): New Entity_Id denoting a
3175 special type to be associated with variables that provide debugger
3176 encodings for renaming declarations.
3177
31782007-08-16 Gary Dismukes <dismukes@adacore.com>
3179 Ed Schonberg <schonberg@adacore.com>
3180 Javier Miranda <miranda@adacore.com>
3181
3182 * exp_aggr.adb (Build_Record_Aggr_Code): Extend the test for an
3183 ancestor part given by an aggregate to test for an unchecked conversion,
3184 since this can occur in some cases when the ancestor part is a function
3185 call, and we don't want to fall into the recursive call to this
3186 procedure in that case.
3187
3188 * exp_ch3.adb (Stream_Operation_OK): Revise tests for availability of
3189 stream attributes on limited types to account for user-specified
3190 attributes as well as whether Input (resp. Output) becomes available
3191 due to Read (resp. Write) being available for the type. Change Boolean
3192 variable to the more accurate name
3193 Has_Predefined_Or_Specified_Stream_Attribute. Change convoluted
3194 double-"not" predicate at beginning of return statement to more
3195 understandable form.
3196
3197 * exp_ch5.adb (Expand_N_Extended_Return_Statement): If the extended
3198 return has an associated N_Handled_Sequence_Of_Statements, then wrap it
3199 in a block statement and use that as the first statement of the
3200 expanded return rather than incorrectly using the handled sequence as
3201 the first statement.
3202
3203 * exp_ch6.adb (Expand_N_Subprogram_Declaration): If this is a protected
3204 operation, generate an explicit freeze node for it rather than
3205 generating extra formals, to ensure that gigi has the proper order of
3206 elaboration for anonymous subtypes in the signature of the subprograms.
3207 (Build_In_Place_Formal): Move assertion to beginning of loop.
3208 (Is_Build_In_Place_Function_Call): Allow for an unchecked conversion
3209 applied to a function call (occurs for some cases of 'Input).
3210 (Make_Build_In_Place_Call_In_*): Allow for an unchecked conversion
3211 applied to a function call (occurs for some cases of 'Input).
3212
3213 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): For Ada
3214 2005, generate an extended return statement enclosing the result object
3215 and 'Read call.
3216
3217 * freeze.adb (Freeze_Record_Type): Extend the current management of
3218 components that are access type with an allocator as default value: add
3219 missing support to the use of qualified expressions of the
3220 allocator (which also cause freezing of the designated type!)
3221 (Freeze_Entity): Call Freeze_Subprogram in the case of a predefined
3222 dispatching operation, since extra formals may be needed by calls to
3223 build-in-place functions (such as stream 'Input).
3224
3225 * sem_ch6.adb (Create_Extra_Formals): Skip creation of the extra
3226 formals for 'Constrained and accessibility level in the case of a
3227 predefined dispatching operation.
3228
3229 * exp_util.adb (Insert_Actions): A protected body is a valid insertion
3230 point, no need to find the parent node.
3231
32322007-08-16 Javier Miranda <miranda@adacore.com>
3233
3234 * exp_attr.adb (Attribute_Priority): Add missing support for entries
3235 and entry barriers.
3236
32372007-08-16 Javier Miranda <miranda@adacore.com>
3238
3239 * exp_ch9.adb (Build_Protected_Entry): Undo previous change because it
3240 is not really required and can introduce regression with the debugger.
3241 The original problem is fixed with the patch written for checks.adb.
3242
32432007-08-16 Thomas Quinot <quinot@adacore.com>
3244
3245 * g-dyntab.adb, g-table.adb, table.adb: (Set_Item): Suppress
3246 Range_Check on Allocated_Table.
3247
32482007-08-16 Vincent Celier <celier@adacore.com>
3249
3250 * make.adb (Collect_Arguments): Call Test_If_Relative_Path with
3251 Including_Non_Switch set to False.
3252 (Gnatmake): For the compiler, call Test_If_Relative_Path with
3253 Including_Non_Switch set to False.
3254
3255 * makeutl.adb, makeutl.ads (Test_If_Relative_Path): New Boolean
3256 parameter Including_Non_Switch, defaulted to True. When
3257 Including_Non_Switch is False, options that are not switches and
3258 appear as relative path are not converted to absolute paths.
3259
32602007-08-16 Nicolas Roche <roche@adacore.com>
3261
3262 * Makefile.in (gnatlib): Propagate FORCE_DEBUG_ADAFLAGS value to sub
3263 makefiles
3264
3265 * Make-lang.in: Update dependencies
3266
32672007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
3268
3269 * sem_ch10.adb (Has_With_Clause): If the name of the with clause
3270 currently inspected is a selected component, retrieve the entity of
3271 its selector.
3272 (Install_Limited_Withed_Unit): Call Has_Limited_With_Clause starting
3273 from the immediate ancestor of Main_Unit_Entity.
3274 (Install_Limited_Withed_Unit): Do not install the limited view of
3275 package P if P is reachable through an ancestor chain from package C
3276 and C also has a with clause for P in its body.
3277 (Has_Limited_With_Clause): New routine.
3278 (Has_With_Clause): New routine.
3279
32802007-08-16 Ed Schonberg <schonberg@adacore.com>
3281
3282 * sem_ch12.adb (Copy_Generic_Node): A reference to a child unit of the
3283 generic for an enclosing instance is a global reference, even though
3284 its scope is the enclosing instance.
3285
32862007-08-16 Gary Dismukes <dismukes@adacore.com>
3287 Javier Miranda <miranda@adacore.com>
3288
3289 * sem_ch3.adb (OK_For_Limited_Init_In_05): Allow calls to 'Input to
3290 initialize a limited object.
3291 (Build_Derived_Record_Type): Add missing check of rules ARM 3.9.4
3292 13/2 and 14/2.
3293 Make sure Has_Complex_Representation is inherited by derived type.
3294
32952007-08-16 Robert Dewar <dewar@adacore.com>
3296
3297 * sem_ch5.adb (Analyze_Assignment): Make sure we still note update in
3298 exception case
3299
33002007-08-16 Ed Schonberg <schonberg@adacore.com>
3301
3302 * sem_disp.adb (Check_Dispatching_Operation): If the operation
3303 implements an operation inherited from a progenitor interface, verify
3304 that they are subtype-conformant.
3305
33062007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
3307 Bob Duff <duff@adacore.com>
3308 Nicolas Setton <setton@adacore.com>
3309
3310 * sem_res.adb (Comes_From_Predefined_Lib_Unit): New.
3311 (Resolve): Alphabetize local variables. Add new variable From_Lib. When
3312 the statement which is being resolved comes from a predefined library
3313 unit, all non-predefined library interpretations are skipped.
3314 (Resolve_Op_Concat): If string concatenation was folded in the parser,
3315 but the "&" is user defined, give an error, because the folding would
3316 be wrong.
3317
3318 * sinfo.ads, sinfo.adb (Is_Folded_In_Parser): New flag to indicate that
3319 the parser has folded a long sequence of concatenations of string
3320 literals.
3321
3322 * trans.c (Handled_Sequence_Of_Statements_to_gnu): Mark "JMPBUF_SAVE"
3323 and "JMP_BUF" variables as artificial.
3324 (N_String_Literal): Do not use alloca for very long string literals. Use
3325 xmalloc/free instead. Otherwise the stack might overflow.
3326
3327 * utils.c (init_gigi_decls): Mark "JMPBUF_T" type as created by the
3328 compiler.
3329
33302007-08-16 Vincent Celier <celier@adacore.com>
3331
3332 * vms_conv.adb (Process_Argument): Ensure that project related options
3333 are not put in the -cargs section when using GNAT COMPILE.
3334
33352007-08-16 Robert Dewar <dewar@adacore.com>
3336
3337 * gnat_ugn.texi: Add note on preprocessing (output file not written)
3338
33392007-08-16 Thomas Quinot <quinot@adacore.com>
3340
3341 * a-tags.adb: Minor reformatting.
3342
33432007-08-16 Bob Duff <duff@adacore.com>
3344
3345 * sem_type.ads, sem_ch4.adb: Minor reformatting.
3346
ab6328d0
AC
33472007-08-14 Thomas Quinot <quinot@adacore.com>
3348
3349 * g-soccon-interix.ads, a-excpol-interix.adb, a-intnam-interix.ads,
3350 s-osinte-interix.ads, system-interix.ads: Removed.
3351
33522007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
3353
3354 * a-calend-vms.adb, a-calend.adb ("+", "-", Add, Subtract): Remove
3355 calls to Check_Within_Time_Bounds.
3356 ("+", "-", Add, Subtract): Remove calls to Check_Within_Time_Bounds.
3357 (Difference): Account for possible rounding of the resulting difference
3358
33592007-08-14 Robert Dewar <dewar@adacore.com>
3360
3361 * uintp.adb, a-ztedit.adb, s-wchcon.adb, xnmake.adb, s-wchcon.adb,
3362 par-ch5.adb, par-ch10.adb, get_targ.adb, a-wtedit.adb, a-teioed.adb,
3363 s-osinte-solaris.adb, s-osinte-solaris.ads,
3364 s-osinte-freebsd.ads, s-osinte-freebsd.adb: Minor reformatting.
3365
3366 * styleg.adb, styleg.ads, stylesw.adb, stylesw.ads: implement style
3367 switch -gnatyS. Enable -gnatyS in GNAT style check mode
3368
33692007-08-14 Robert Dewar <dewar@adacore.com>
3370 Ed Schonberg <schonberg@adacore.com>
3371
3372 * inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads:
3373 Suppress unmodified in-out parameter warning in some cases
3374 This patch is a also fairly significant change to the way suppressible
3375 checks are handled.
3376
3377 * checks.ads, checks.adb (Install_Null_Excluding_Check): No check
3378 needed for access to concurrent record types generated by the expander.
3379 (Generate_Range_Check): When generating a temporary to capture the
3380 value of a conversion that requires a range check, set the type of the
3381 temporary before rewriting the node, so that the type is always
3382 properly placed for back-end use.
3383 (Apply_Float_Conversion_Check): Handle case where the conversion is
3384 truncating.
3385 (Get_Discriminal): Code reformatting. Climb the scope stack looking
3386 for a protected type in order to examine its discriminants.
3387
33882007-08-14 Robert Dewar <dewar@adacore.com>
3389 Gary Dismukes <dismukes@adacore.com>
3390 Ed Schonberg <schonberg@adacore.com>
3391 Thomas Quinot <quinot@adacore.com>
3392
3393 * a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb,
3394 a-stwisu.adb, a-strsup.adb: Fix warnings for range
3395 tests optimized out.
3396
3397 * exp_ch4.adb (Expand_N_In): Add warnings for range tests optimized out.
3398 (Get_Allocator_Final_List): For the case of an anonymous access type
3399 that has a specified Associated_Final_Chain, do not go up to the
3400 enclosing scope.
3401 (Expand_N_Type_Conversion): Test for the case of renamings of access
3402 parameters when deciding whether to apply a run-time accessibility
3403 check.
3404 (Convert_Aggr_In_Allocator): Use Insert_Actions to place expanded
3405 aggregate code before allocator, and ahead of declaration for
3406 temporary, to prevent access before elaboration when the allocator is
3407 an actual for an access parameter.
3408 (Expand_N_Type_Conversion): On an access type conversion involving an
3409 access parameter, do not apply an accessibility check when the
3410 operand's original node was an attribute other than 'Access. We now
3411 create access conversions for the expansion of 'Unchecked_Access and
3412 'Unrestricted_Access in certain cases and clearly accessibility should
3413 not be checked for those.
3414
3415 * exp_ch6.ads, exp_ch6.adb (Add_Call_By_Copy_Code): For an actual that
3416 includes a type conversion of a packed component that has been expanded,
3417 recover the original expression for the object, and use this expression
3418 in the post-call assignment statement, so that the assignment is made
3419 to the object and not to a back-end temporary.
3420 (Freeze_Subprogram): In case of primitives of tagged types not defined
3421 at the library level force generation of code to register the primitive
3422 in the dispatch table. In addition some code reorganization has been
3423 done to leave the implementation clear.
3424 (Expand_Call): When expanding an inherited implicit conversion,
3425 preserve the type of the inherited function after the intrinsic
3426 operation has been expanded.
3427
3428 * exp_ch2.ads, exp_ch2.adb
3429 (Expand_Entry_Parameter.In_Assignment_Context): An implicit dereference
3430 of an entry formal appearing in an assignment statement does not assign
3431 to the formal.
3432 (Expand_Current_Value): Instead of calling a routine to determine
3433 whether the prefix of an attribute reference should be optimized or
3434 not, prevent the optimization of such prefixes all together.
3435
3436 * lib-xref.adb (Generate_Reference.Is_On_LHS): An indexed or selected
3437 component whose prefix is known to be of an access type is an implicit
3438 dereference and does not assign to the prefix.
3439
34402007-08-14 Ed Schonberg <schonberg@adacore.com>
3441 Robert Dewar <dewar@adacore.com>
3442
3443 * atree.ads, atree.adb (New_Copy_Tree): If hash table is being used and
3444 itype is visited, make an entry into table to link associated node and
3445 new itype.
3446 Add comments and correct harmless error in Build_NCT_Hash_Tables
3447 (Array_Aggr_Subtype): Associate each itype created for an index type to
3448 the corresponding range construct, and not to the aggregate itself. to
3449 maintain a one-to-one correspondence between itype and its associated
3450 node, to prevent errors when complex expression is copied.
3451 Fix mishandling of multiple levels of parens
3452
3453 * sem_aggr.adb: Create a limited view of an incomplete type, to make
3454 treatment of limited views uniform for all visible declarations in a
3455 limited_withed package.
3456 (New_Copy_Tree): If hash table is being used and itype is visited,
3457 make an entry into table to link associated node and new itype.
3458 (Resolve_Record_Aggregate): Do not add an others box association for a
3459 discriminated record component that has only discriminants, when there
3460 is a box association for the component itself.
3461
3462 * par-ch4.adb: Fix mishandling of multiple levels of parens
3463
34642007-08-14 Robert Dewar <dewar@adacore.com>
3465
3466 * comperr.adb: Fix problem with suppressing warning messages from gigi
3467
3468 * erroutc.ads, erroutc.adb, errout.ads,
3469 errout.adb (Write_Eol): Remove trailing spaces before writing the line
3470 (Write_Eol_Keep_Blanks): New procedure to write a line, including
3471 possible trailing spaces.
3472 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
3473 Fix problem with suppressing warning messages from back end
3474 Improve handling of deleted warnings
3475
3476 * gnat1drv.adb:
3477 Fix problem with suppressing warning messages from back end
3478 Handle setting of Static_Dispatch_Tables flag.
3479
3480 * prepcomp.adb:
3481 Fix problem with suppressing warning messages from back end
3482
3483 * exp_intr.adb: Improve handling of deleted warnings
3484
34852007-08-14 Robert Dewar <dewar@adacore.com>
3486
3487 * debug.adb: Improve -gnatdI to cover all cases of serialization
3488 Add documentation of dZ, d.t
3489
3490 * sprint.ads, sprint.adb: Improve -gnatdI to cover all cases of
3491 serialization.
3492 (Sprint_Node_Actual): Generate new output associated with implicit
3493 importation and implicit exportation of object declarations.
3494
34952007-08-14 Ed Schonberg <schonberg@adacore.com>
3496 Robert Dewar <dewar@adacore.com>
3497 Javier Miranda <miranda@adacore.com>
3498 Gary Dismukes <dismukes@adacore.com>
3499
3500 * einfo.ads, einfo.adb: Create a limited view of an incomplete type,
3501 to make treatment of limited views uniform for all visible declarations
3502 in a limited_withed package.
3503 Improve warnings for in out parameters
3504 (Set_Related_Interaface/Related_Interface): Allow the use of this
3505 attribute with constants.
3506 (Write_Field26_Name): Handle attribute Related_Interface in constants.
3507 Warn on duplicate pragma Preelaborable_Initialialization
3508
3509 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Force the
3510 generation of a freezing node to ensure proper management of null
3511 excluding access types in the backend.
3512 (Create_Extra_Formals): Test base type of the formal when checking for
3513 the need to add an extra accessibility-level formal. Pass the entity E
3514 on all calls to Add_Extra_Formal (rather than Scope (Formal) as was
3515 originally being done in a couple of cases), to ensure that the
3516 Extra_Formals list gets set on the entity E when the first entity is
3517 added.
3518 (Conforming_Types): Add missing calls to Base_Type to the code that
3519 handles anonymous access types. This is required to handle the
3520 general case because Process_Formals builds internal subtype entities
3521 to handle null-excluding access types.
3522 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
3523 functions that need it, even when not marked Requires_Overriding.
3524 Improve warnings for in out parameters
3525 (Analyze_Function_Return): Warn for disallowed null return
3526 Warn on return from procedure with unset out parameter
3527 Ensure consistent use of # in error messages
3528 (Check_Overriding_Indicator): Add in parameter Is_Primitive.
3529 (Analyze_Function_Return): Move call to Apply_Constraint_Check before
3530 the implicit conversion of the expression done for anonymous access
3531 types. This is required to generate the code of the null excluding
3532 check (if required).
3533
3534 * sem_warn.ads, sem_warn.adb (Check_References.Publicly_Referenceable):
3535 A formal parameter is never publicly referenceable outside of its body.
3536 (Check_References): For an unreferenced formal parameter in an accept
3537 statement, use the same warning circuitry as for subprogram formal
3538 parameters.
3539 (Warn_On_Unreferenced_Entity): New subprogram, taken from
3540 Output_Unreferenced_Messages, containing the part of that routine that
3541 is now reused for entry formals as described above.
3542 (Goto_Spec_Entity): New function
3543 (Check_References): Do not give IN OUT warning for dispatching operation
3544 Improve warnings for in out parameters
3545 (Test_Ref): Check that the entity is not undefinite before calling
3546 Scope_Within, in order to avoid infinite loops.
3547 Warn on return from procedure with unset out parameter
3548 Improved warnings for unused variables
3549
35502007-08-14 Robert Dewar <dewar@adacore.com>
3551 Javier Miranda <miranda@adacore.com>
3552 Gary Dismukes <dismukes@adacore.com>
3553
3554 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of child unit
3555 (Expand_N_Attribute_Reference): Further unify the handling of the
3556 three forms of access attributes, using common code now for all three
3557 cases. Add a test for the case of applying an access attribute to
3558 an explicit dereference when the context is an access-to-interface
3559 type. In that case we need to apply the conversion to the prefix
3560 of the explicit dereference rather than the prefix of the attribute.
3561 (Attribute_Version, UET_Address): Set entity as internal to ensure
3562 proper dg output of implicit importation.
3563 (Expand_Access_To_Type): Removed.
3564 (Expand_N_Attribute_Reference): Merge the code from the three cases
3565 of access attributes, since the processing is largely identical for
3566 these cases. The substantive fix here is to process the case of a
3567 type name prefix (current instance case) before handling the case
3568 of interface prefixes.
3569
35702007-08-14 Thomas Quinot <quinot@adacore.com>
3571 Ed Schonberg <schonberg@adacore.com>
3572 Javier Miranda <miranda@adacore.com>
3573 Robert Dewar <dewar@adacore.com>
3574
3575 * exp_ch3.ads, exp_ch3.adb (Add_Final_Chain): New subprogram.
3576 (Freeze_Array_Type, Freeze_Record_Type): For the case of a component
3577 type that is an anonymous access to controlled object, establish
3578 an associated finalization chain to avoid corrupting the global
3579 finalization list when a dynamically allocated object designated
3580 by such a component is deallocated.
3581 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
3582 functions that need it, even when not marked Requires_Overriding.
3583 (Initialize_Tag): Replace call to has_discriminants by call to
3584 Is_Variable_Size_Record in the circuitry that handles the
3585 initialization of secondary tags.
3586 (Is_Variable_Size_Record): New implementation.
3587 (Expand_N_Object_Declaration): Suppress call to init proc if there is a
3588 Suppress_Initialization pragma for a derived type.
3589 (Is_Variable_Size_Record): New subprogram.
3590 (Build_Offset_To_Top_Functions): New implementation that simplifies the
3591 initial version of this routine and also fixes problems causing
3592 incomplete initialization of the table of interfaces.
3593 (Build_Init_Procedure): Improve the generation of code to initialize the
3594 the tag components of secondary dispatch tables.
3595 (Init_Secondary_Tags): New implementation that simplifies the previous
3596 version of this routine.
3597 (Make_DT): Add parameter to indicate when type has been frozen by an
3598 object declaration, for diagnostic purposes.
3599 (Check_Premature_Freezing): New subsidiary procedure of Make_DT, to
3600 diagnose attemps to freeze a subprogram when some untagged type of its
3601 profile is a private type whose full view has not been analyzed yet.
3602 (Freeze_Array_Type): Generate init proc for packed array if either
3603 Initialize or Normalize_Scalars is set.
3604 (Make_Controlling_Function_Wrappers, Make_Null_Procedure_Specs): when
3605 constructing the new profile, copy the null_exclusion indicator for each
3606 parameter, to ensure full conformance of the new body with the spec.
3607
3608 * sem_type.ads, sem_type.adb (Make_Controlling_Function_Wrappers):
3609 Create wrappers for constructor functions that need it, even when not
3610 marked Requires_Overriding.
3611 (Covers): Handle properly designated types of anonymous access types,
3612 whose non-limited views are themselves incomplete types.
3613 (Add_Entry): Use an entity to store the abstract operation which hides
3614 an interpretation.
3615 (Binary_Op_May_Be_Hidden): Rename to Binary_Op_Interp_Has_Abstract_Op.
3616 (Collect_Interps): Use Empty as an actual for Abstract_Op in the
3617 initialization aggregate.
3618 (Function_Interp_May_Be_Hidden): Rename to
3619 Function_Interp_Has_Abstract_Op.
3620 (Has_Compatible_Type): Remove machinery that skips interpretations if
3621 they are labeled as potentially hidden by an abstract operator.
3622 (Has_Hidden_Interp): Rename to Has_Abstract_Op.
3623 (Set_May_Be_Hidden): Rename to Set_Abstract_Op.
3624 (Write_Overloads): Output the abstract operator if present.
3625 (Add_Entry): Before inserting a new entry into the interpretation table
3626 for a node, determine whether the entry will be disabled by an abstract
3627 operator.
3628 (Binary_Op_Interp_May_Be_Hidden): New routine.
3629 (Collect_Interps): Add value for flag May_Be_Hidden in initialization
3630 aggregate.
3631 (Function_Interp_May_Be_Hidden): New routine.
3632 (Has_Compatible_Type): Do not consider interpretations hidden by
3633 abstract operators when trying to determine whether two types are
3634 compatible.
3635 (Has_Hidden_Interp): New routine.
3636 (Set_May_Be_Hidden_Interp): New routine.
3637 (Write_Overloads): Write the status of flag May_Be_Hidden.
3638
36392007-08-14 Ed Schonberg <schonberg@adacore.com>
3640 Javier Miranda <miranda@adacore.com>
3641
3642 * exp_disp.ads, exp_disp.adb (Build_Dispatch_Tables): Handle tagged
3643 types declared in the declarative part of a nested package body or in
3644 the proper body of a stub.
3645 (Set_All_DT_Position): Add missing check to avoid wrong assignation
3646 of the same dispatch table slot to renamed primitives.
3647 (Make_Select_Specific_Data_Table): Handle private types.
3648 (Tagged_Kind): Handle private types.
3649 (Make_Tags, Make_DT): Set tag entity as internal to ensure proper dg
3650 output of implicit importation and exportation.
3651 (Expand_Interface_Thunk): Fix bug in the expansion assuming that the
3652 first formal of the thunk is always associated with the controlling
3653 type. In addition perform the following code cleanup: remove formal
3654 Thunk_Alias which is no longer required, cleanup evaluation of the
3655 the controlling type, and update the documentation.
3656 Replace occurrence of Default_Prim_Op_Count by
3657 Max_Predef_Prims. Addition of compile-time check to verify
3658 that the value of Max_Predef_Prims is correct.
3659 (Check_Premature_Freezing): Apply check in Ada95 mode as well.
3660 (Make_DT): Add parameter to indicate when type has been frozen by an
3661 object declaration, for diagnostic purposes.
3662 (Build_Static_Dispatch_Tables): New subprogram that takes care of the
3663 construction of statically allocated dispatch tables.
3664 (Make_DT): In case of library-level tagged types export the declaration
3665 of the primary tag. Remove generation of tags (now done by Make_Tags).
3666 Additional modifications to handle non-static generation of dispatch
3667 tables. Take care of building tables for asynchronous interface types
3668 (Make_Tags): New subprogram that generates the entities associated with
3669 the primary and secondary tags of Typ and fills the contents of Access_
3670 Disp_Table. In case of library-level tagged types imports the forward
3671 declaration of the primary tag that will be declared later by Make_DT.
3672 (Expand_Interface_Conversion): In case of access types to interfaces
3673 replace an itype declaration by an explicit type declaration to avoid
3674 problems associated with the scope of such itype in transient blocks.
3675
36762007-08-14 Robert Dewar <dewar@adacore.com>
3677 Ed Schonberg <schonberg@adacore.com>
3678 Javier Miranda <miranda@adacore.com>
3679
3680 * exp_util.ads, exp_util.adb:
3681 This patch replaces a number of occurrences of explicit tests for N_Null
3682 with calls to Known_Null. This improves tracking of null values, since
3683 Known_Null also catches null constants, and variables currently known to
3684 be null, so we get better tracking.
3685 (Ensure_Defined): create an itype reference only in the scope of the
3686 itype.
3687 (Side_Effect_Free): A selected component of an access type that
3688 denotes a component with a rep clause must be treated as not
3689 side-effect free, because if it is part of a linked structure its
3690 value may be affected by a renaming.
3691 (Expand_Subtype_From_Expr): For limited objects initialized with build
3692 in place function calls, do nothing; otherwise we prematurely introduce
3693 an N_Reference node in the expression initializing the object, which
3694 breaks the circuitry that detects and adds the additional arguments to
3695 the called function. Bug found working in the new patch for statically
3696 allocated dispatch tables.
3697 (Is_Library_Level_Tagged_Type): New subprogram.
3698 (Remove_Side_Effects): If the expression of an elementary type is an
3699 operator treat as a function call.
3700 (Make_Literal_Range): If the index type of the array is not integer, use
3701 attributes properly to compute the constraint on the resulting aggregate
3702 which is a string.
3703
3704 * freeze.ads, freeze.adb (Freeze_Entity): If the entity is a
3705 class-wide type whose base type is an incomplete private type, leave
3706 class-wide type unfrozen so that freeze nodes can be generated
3707 properly at a later point.
3708 (Freeze_Entity, array case): Handle case of pragma Pack and component
3709 size attributre clause for same array.
3710
37112007-08-14 Vincent Celier <celier@adacore.com>
3712
3713 * prj.ads, prj.adb: Update Project Manager to new attribute names for
3714 gprbuild.
3715 Allow all valid declarations in configuration project files
3716 (Reset): Initialize all tables and hash tables in the project tree data
3717 Major update of the Project Manager and of the project aware tools,
3718 including gprmake, so that the same sources in the GNAT repository
3719 can be used by gprbuild.
3720 (Slash_Id): Change type to be Path_Name_Type
3721 (Slash): Return a Path_Name_Type instead of a File_Name_Type
3722
3723 * prj-attr.ads, prj-attr.adb: Remove attributes no longer used by
3724 gprbuild.
3725 Update Project Manager to new attribute names for ghprbuild
3726 Allow all valid declarations in configuration project files
3727 Major update of the Project Manager and of the project aware tools,
3728 including gprmake, so that the same sources in the GNAT repository
3729 can be used by gprbuild.
3730
3731 * prj-com.ads:
3732 Major update of the Project Manager and of the project aware tools,
3733 including gprmake, so that the same sources in the GNAT repository
3734 can be used by gprbuild.
3735
3736 * prj-dect.adb (Prj.Strt.Attribute_Reference): Set correctly the case
3737 insensitive flag for attributes with optional index.
3738 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
3739 array attribute, put the index in lower case.
3740 Update Project Manager to new attribute names for ghprbuild
3741 Allow all valid declarations in configuration project files
3742 Major update of the Project Manager and of the project aware tools,
3743 including gprmake, so that the same sources in the GNAT repository
3744 can be used by gprbuild.
3745
3746 * prj-env.ads, prj-env.adb:
3747 Major update of the Project Manager and of the project aware tools,
3748 including gprmake, so that the same sources in the GNAT repository
3749 can be used by gprbuild.
3750 (Get_Reference): Change type of parameter Path to Path_Name_Type
3751
3752 * prj-ext.ads, prj-ext.adb (Initialize_Project_Path): Make sure, after
3753 removing '-' from the path to start with the first character of the
3754 next directory.
3755 Major update of the Project Manager and of the project aware tools,
3756 including gprmake, so that the same sources in the GNAT repository
3757 can be used by gprbuild.
3758 Major update of the Project Manager and of the project aware tools,
3759 including gprmake, so that the same sources in the GNAT repository
3760 can be used by gprbuild.
3761
3762 * prj-nmsc.ads, prj-nmsc.adb:
3763 Update Project Manager to new attribute names for ghprbuild
3764 Allow all valid declarations in configuration project files
3765 (Search_Directories): Detect subunits that are specified with an
3766 attribute Body in package Naming. Do not replace a source/unit in the
3767 same project when the order of the source dirs are known. Detect
3768 duplicate sources/units in the same project when the order of the
3769 source dirs are not known.
3770 (Check_Ada_Name): Allow all identifiers that are not reserved words
3771 in Ada 95.
3772 Major update of the Project Manager and of the project aware tools,
3773 including gprmake, so that the same sources in the GNAT repository
3774 can be used by gprbuild.
3775 (Look_For_Sources): If the list of sources is empty, set the object
3776 directory of non extending project to nil.
3777 Change type of path name variables to be Path_Name_Type
3778 (Locate_Directory): Make sure that on Windows '/' is converted to '\',
3779 otherwise creating missing directories will fail.
3780
3781 * prj-attr-pm.adb, prj-tree.ads, prj-proc.ads, prj-proc.adb,
3782 prj-part.ads, prj-part.adb:
3783 Major update of the Project Manager and of the project aware tools,
3784 including gprmake, so that the same sources in the GNAT repository
3785 can be used by gprbuild.
3786
3787 * prj-strt.adb (Prj.Strt.Attribute_Reference): Set correctly the case
3788 insensitive flag for attributes with optional index.
3789 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
3790 array attribute, put the index in lower case.
3791 (Parse_Variable_Reference): Allow the current project name to be used in
3792 the prefix of an attribute reference.
3793
3794 * prj-util.ads, prj-util.adb
3795 (Value_Of (for arrays)): New Boolean parameter Force_Lower_Case_Index,
3796 defaulted to False. When True, always check against indexes in lower
3797 case.
3798
3799 * snames.ads, snames.h, snames.adb:
3800 Update Project Manager to new attribute names for gprbuild
3801 Allow all valid declarations in configuration project files
3802
38032007-08-14 Robert Dewar <dewar@adacore.com>
3804 Ed Schonberg <schonberg@adacore.com>
3805
3806 * opt.ads: Warning for non-local exception propagation now off by
3807 default
3808 New switch -gnatI to disable representation clauses
3809 Implement new pragma Implicit_Packing
3810
3811 * usage.adb:
3812 Warning for non-local exception propagation now off by default
3813 Add warning for unchecked conversion of pointers wi different
3814 conventions.
3815 New switch -gnatI to disable representation clauses
3816
3817 * usage.adb: new switch -gnatyS
3818
3819 * gnat_ugn.texi: For the gnatcheck Non_Qualified_Aggregates rule add a
3820 note that aggregates of anonymous array types are not flagged.
3821 -gnatwc now includes membership tests optimized away
3822 -gnatw.x warnings are now off by default
3823 Added conditional compilation Appendix
3824 Add documentation of -gnatI
3825 Add documentation for new -gnatyS style check
3826 Update documentation about SAL and auto-init on Windows.
3827
3828 * gnat_rm.texi:
3829 Add documentation for pragma Check_Name and 'Enabled attribute
3830 Document that Eliminate on dispatching operation is ignored
3831 Document IDE attributes VCS_Repository_Root and VCS_Patch_Root.
3832 Document pragma Main
3833 Document pragma Implicit_Packing
3834
3835 * sem_ch13.adb: Add warning for unchecked conversion of pointers wi
3836 different conventions
3837 New switch -gnatI to disable representation clauses
3838
3839 * switch-c.adb (Scan_Front_End_Switches): When a -gnat switch is not
3840 recognized, report the invalid characters including "-gnat" instead of
3841 just the first character in the switch.
3842 New switch -gnatI to disable representation clauses
3843 Set Warn_On_Object_Renames_Function true for -gnatg
3844
3845 * vms_data.ads: Add doc for /IGNORE_REP_CLAUSES
3846 Add STATEMENTS_AFTER_THEN_ELSE as synonym for -gnatyS
3847 Add qualifier /ADD_PROJECT_SEARCH_DIR= for different tools, equivalent
3848 to switch -aP (add directory to project search dir).
3849
3850 * par-prag.adb: Implement new pragma Implicit_Packing
3851
3852 * sem_prag.adb (Analyze_Pragma, case Complex_Representation): Mark the
3853 type as having a non-standard representation, to force expansion on
3854 conversion to related types.
3855 (Analyze_Pragma): Warn on misspelled pragma
3856 (Analyze_Pragma, case Convention_Identifier): Fix checking of second arg
3857 Ensure consistent use of # in error messages
3858 Implement pragma Implicit_Packing
3859
38602007-08-14 Olivier Hainque <hainque@adacore.com>
3861 Eric Botcazou <ebotcazou@adacore.com>
3862
3863 * targtyps.c (get_target_maximum_default_alignment): New function.
3864 Maximum alignment
3865 that the compiler might choose by default for a type or object.
3866 (get_target_default_allocator_alignment): New function. Alignment known
3867 to be honored by the target default allocator.
3868 (get_target_maximum_allowed_alignment): New function. Maximum alignment
3869 we might accept for any type or object on the target.
3870 (get_target_maximum_alignment): Now synonym of maximum_default_alignment
3871
3872 * gigi.h (get_target_maximum_default_alignment): Declare new function.
3873 (get_target_default_allocator_alignment): Likewise.
3874 (get_target_maximum_allowed_alignment): Likewise.
3875
3876 PR ada/19037
3877 * decl.c (gnat_to_gnu_entity) <object>: Except for the renaming of the
3878 result of a function call, first try to use a stabilized reference for
3879 a constant renaming too.
3880 (validate_alignment): Use target_maximum_allowed_alignment instead of
3881 MAX_OFILE_ALIGNMENT as the upper bound to what we accept.
3882 (gnat_to_gnu_entity): Use common nodes directly.
3883 (gnat_to_gnu_entity) <object>: Pick the values of the type to annotate
3884 alignment and size for the object.
3885 (lvalue_required_p): Handle N_Parameter_Association like N_Function_Call
3886 and N_Procedure_Call_Statement.
3887 (takes_address): Rename to lvalue_required_p, add third parameter
3888 'aliased' and adjust recursive calls.
3889 <N_Indexed_Component>: Update 'aliased' from the array type.
3890 <N_Selected_Component>: New case.
3891 <N_Object_Renaming_Declaration>: New Likewise.
3892 (Identifier_to_gnu): Adjust for above changes.
3893 (maybe_stabilize_reference) <CONST_DECL>: New case.
3894
3895 * utils2.c (build_binary_op) <ARRAY_RANGE_REF>: Look through conversion
3896 between type variants.
3897 (build_simple_component_ref): Likewise.
3898 (build_call_alloc_dealloc): Use target_default_allocator_alignment
3899 instead of BIGGEST_ALIGNMENT as the threshold to trigger the super
3900 aligning type circuitry for allocations from the default storage pool.
3901 (build_allocator): Likewise.
3902 (build_simple_component_ref): Manually fold the reference for a
3903 constructor if the record type contains a template.
3904
3905 * utils.c (value_zerop): Delete.
3906 (gnat_init_decl_processing): Emit debug info for common types.
3907 (rest_of_record_type_compilation): If a union contains a field
3908 with a non-constant qualifier, treat it as variable-sized.
3909 (finish_record_type): Give the stub TYPE_DECL a name.
3910 (rest_of_record_type_compilation): Likewise.
3911 (convert) <CONSTRUCTOR>: New case. Build a new constructor if
3912 types are equivalent array types.
3913 (create_field_decl): Claim fields of any ARRAY_TYPE are addressable,
3914 even if the type is not passed by reference.
3915 (static_ctors, static_dtors): Delete.
3916 (end_subprog_body): Do not record constructors and destructors.
3917 (build_global_cdtor): Delete.
3918 (gnat_write_global_declarations): Do not call build_global_cdtor.
3919
0ab29e91 3920 * lang-spARGET_VXWORKS_RTP is defined, append -mrtp when
ab6328d0
AC
3921 -fRTS=rtp is specified.
3922 If CONFIG_DUAL_EXCEPTIONS is 1, append -fsjlj when -fRTS=sjlj is
3923 specified.
3924
3925 * misc.c (gnat_init_gcc_eh): Use __gnat_eh_personality_sj for the name
3926 of the personality function with SJLJ exceptions.
3927
3928 * raise-gcc.c (PERSONALITY_FUNCTION): Use __gnat_eh_personality_sj for
3929 the name of the personality function with SJLJ exceptions.
3930
39312007-08-14 Robert Dewar <dewar@adacore.com>
3932 Ed Schonberg <schonberg@adacore.com>
3933
3934 * par.ads, par.adb: Improve handling of extra right parens.
3935 (Par): Remove flag From_Limited_With_Clause.
3936
3937 * par-util.adb, par-ch3.adb: Improve error recovery for bad constraint
3938 Improve handling of extra right parens.
3939
39402007-08-14 Robert Dewar <dewar@adacore.com>
3941
3942 * par-tchk.adb (TF_Semicolon): Improve error recovery
3943
39442007-08-14 Robert Dewar <dewar@adacore.com>
3945 Ed Schonberg <schonberg@adacore.com>
3946
3947 * sem_attr.ads, sem_attr.adb (Analyze_Attribute, case Value): For
3948 enumeration type, mark all literals as referenced.
3949 (Eval_Attribute, case 'Image): If the argument is an enumeration
3950 literal and names are available, constant-fold but mark nevertheless as
3951 non-static.
3952 Clean up function names.
3953 (Name_Modifies_Prefix): Rename to Name_Implies_Lvalue_Prefix. Clarify
3954 comment.
3955 (Requires_Simple_Name_Prefix): Removed.
3956
39572007-08-14 Robert Dewar <dewar@adacore.com>
3958 Ed Schonberg <schonberg@adacore.com>
3959
3960 * sem_ch11.adb: Improved warnings for unused variables
3961
3962 * sem_ch3.ads, sem_ch3.adb (Build_Derived_Record_Type): If the ancestor
3963 is a synchronized interface, the derived type is limited.
3964 (Analyze_Object_Declaration): Mark the potential coextensions in the
3965 definition and expression of an object declaration node.
3966 (Build_Derived_Type): For the completion of a private type declaration
3967 with a derived type declaration, chain the parent type's representation
3968 items to the last representation item of the derived type (not the
3969 first one) if they are not present already.
3970 (Analyze_Object_Declaration, Constant_Redeclaration): Allow incomplete
3971 object declaration of forward references to tags.
3972 (Access_Subprogram_Declaration): In Ada2005, anonymous access to
3973 subprogram types can appear as access discriminants of synchronized
3974 types.
3975 (OK_For_Limited_Init_In_05): The initialization is legal is it is a call
3976 given in prefixed form as a selected component.
3977 (Process_Discriminants): If not all discriminants have defaults, place
3978 error message on a default that is present.
3979 (Analyze_Private_Extension_Declaration): Diagnose properly an attempt to
3980 extend a synchronized tagged type.
3981 Improved warnings for unused variables
3982 (Is_Visible_Component): Fix a visibility hole on a component inherited
3983 by a private extension when parent is itself declared as a private
3984 extension, and the derivation is in a child unit.
3985 (Find_Hidden_Interface): Move spec from the package body.
3986
39872007-08-14 Robert Dewar <dewar@adacore.com>
3988 Ed Schonberg <schonberg@adacore.com>
3989
3990 * sem_ch5.adb: Improve warnings on redundant assignments
3991
3992 * sem_util.ads, sem_util.adb: (Is_Variable): Add defense against junk
3993 parameter
3994 (Is_Synchronized_Tagged_Type): New subprogram that returns true
3995 in case of synchronized tagged types (AARM 3.9.4 (6/2)).
3996 (Safe_To_Capture_Value): Can now return True for constants, even if Cond
3997 is set to False. Improves handling of Known_[Not_]Null.
3998 (Wrong_Type): Special case address arithmetic attempt
3999 (Collect_Abstract_Interfaces): Add new formal to allow collecting
4000 abstract interfaces just using the partial view of private types.
4001 (Has_Abstract_Interfaces): Add new formal to allow checking types
4002 covering interfaces using the partial view of private types.
4003 (Is_Fully_Initialized_Type): Special VM case for uTag component. This
4004 component still needs to be defined in this case, but is never
4005 initialized as VMs are using other dispatching mechanisms.
4006 (Abstract_Interface_List): For a protected type, use base type to get
4007 proper declaration.
4008 Improve warnings on redundant assignments
4009 (Is_Variable): Handle properly an implicit dereference of a prefixed
4010 function call.
4011 (Build_Actual_Subtype): If this is an actual subtype for an
4012 unconstrained formal parameter, use the sloc of the body for the new
4013 declaration, to prevent anomalises in the debugger.
4014
40152007-08-14 Robert Dewar <dewar@adacore.com>
4016
4017 * sem_elim.adb (Set_Eliminated): Ignore pragma Eliminate for
4018 dispatching operation
4019
40202007-08-14 Ed Schonberg <schonberg@adacore.com>
4021 Gary Dismukes <dismukes@adacore.com>
4022
4023 * exp_aggr.ads,
4024 exp_aggr.adb (Convert_Aggr_In_Allocator): Use Insert_Actions to place
4025 expanded aggregate code before allocator, and ahead of declaration for
4026 temporary, to prevent access before elaboration when the allocator is
4027 an actual for an access parameter.
4028 (Is_Static_Dispatch_Table_Aggregate): Handle aggregates initializing
4029 the TSD and the table of interfaces.
4030 (Convert_To_Assignments): Augment the test for delaying aggregate
4031 expansion for limited return statements to include the case of extended
4032 returns, to prevent creation of an unwanted transient scope.
4033 (Is_Static_Dispatch_Table_Aggregate): New subprogram.
4034 (Expand_Array_Aggregate): Handle aggregates associated with
4035 statically allocated dispatch tables.
4036 (Expand_Record_Aggregate): Handle aggregates associated with
4037 statically allocated dispatch tables.
4038 (Gen_Ctrl_Actions_For_Aggr): Generate a finalization list for allocators
4039 of anonymous access type.
4040
40412007-08-14 Ed Schonberg <schonberg@adacore.com>
4042
4043 * exp_ch5.adb (Expand_Assign_Array): If source or target of assignment
4044 is a variable that renames a slice, use the variable itself in the
4045 expannsion when the renamed expression itself may be modified between
4046 the declaration of the renaming and the array assignment.
4047
40482007-08-14 Jerome Guitton <guitton@adacore.com>
4049
4050 * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
4051 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-solaris.adb,
4052 s-taprop-vms.adb, s-taprop-posix.adb (Continue_Task, Stop_All_Tasks):
4053 New functions; dummy implementations.
4054
4055 * s-osinte-vxworks.ads (Task_Stop, Task_Cont, Int_Lock, Int_Unlock): New
4056 functions, used to implement the multi-tasks mode routines on VxWorks.
4057
4058 * s-osinte-vxworks.adb, s-osinte-vxworks6.adb (Task_Cont, Task_Stop):
4059 New functions, thin
4060 binding to the VxWorks routines which have changed between VxWorks 5
4061 and 6.
4062 (Int_Lock, Int_Unlock): New function, thin binding to kernel routines
4063 which are not callable from a RTP.
4064
4065 * s-taprop-vxworks.adb (Stop_All_Tasks, Continue_Task): New functions,
4066 implemented for the multi-tasks mode on VxWorks 5 and 6.
4067
4068 * s-taprop.ads (Stop_All_Tasks, Continue_Task): New functions.
4069
4070 * s-tasdeb.ads, s-tasdeb.adb (Continue_All_Tasks, Stop_All_Tasks): New
4071 functions.
4072
40732007-08-14 Vincent Celier <celier@adacore.com>
4074
4075 * clean.adb, fmap.adb, sinput-p.adb, sinput-p.ads, gnatcmd.adb,
4076 gnatname.adb, makeutl.ads, makeutl.adb, makegpr.adb, mlib-tgt-vms.adb
4077 mlib-tgt-darwin.adb, mlib-tgt-lynxos.adb, mlib-prj.adb, mlib-tgt.adb,
4078 mlib-tgt.ads, mlib-tgt-irix.adb mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
4079 mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
4080 mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, mlib-tgt-aix.adb,
4081 mlib-tgt-tru64.adb, mlib.ads, mlib.adb (Create_Sym_Links): New
4082 procedure.
4083 (Major_Id_Name): New function.
4084 mlib-tgt.ads/mlib.tgt.adb:
4085 (Library_Major_Minor_Id_Supported): New function, default returns True
4086 Most mlib-tgt-*.adb that support shared libraries and symbolic links:
4087 (Build_Dynamic_Library): Add support for major/minor ids for shared libs
4088 Other mlib-tgt-*.adb (aix, mingw, vms, vxworks, xi):
4089 Implementation of Library_Major_Minor_Id_Supported returns False
4090 clean.adb:
4091 (Clean_Library_Directory): If major/minor ids are supported, clean all
4092 library files.
4093 Major update of the Project Manager and of the project aware tools,
4094 including gprmake, so that the same sources in the GNAT repository
4095 can be used by gprbuild.
4096
40972007-08-14 Olivier Hainque <hainque@adacore.com>
4098
4099 * system-solaris-x86.ads (ZCX_By_Default): Switch to True.
4100 (GCC_ZCX_Support): Switch to True.
4101
4102 * s-intman-solaris.adb (Notify_Exception): Call
4103 Adjust_Context_For_Raise before raising, as expected for signal
4104 handlers in general.
4105
4106 * s-intman-posix.adb (Notify_Exception): Remove declaration of
4107 Adjust_Context_For_Raise, moved to the spec of this unit to be visible
4108 to other implementation bodies.
4109
4110 * s-intman.ads (Adjust_Context_For_Raise): Declare and import here, to
4111 be visible by multiple implementation bodies.
4112
4113 * init.c [VMS section] (__gnat_handle_vms_condition): Adjust context
4114 only for conditions coming from hardware.
4115 [alpha-tru64 section] (__gnat_adjust_context_for_raise): Implement,
4116 adjustments to signal context prior to exception raise from signal
4117 handler.
4118 (__gnat_map_signal for VxWorks): Map SIGSEGV to Storage_Error in RTP
4119 mode.
4120 Solaris section: (__gnat_adjust_context_for_raise): New function.
4121 Implementation of the machine context adjustments to perform prior to
4122 raise from a signal handler. Version for both sparc and x86.
4123 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Define.
4124 (__gnat_error_handler): Expect a third argument, ucontext_t *. Adjust it
4125 prior to raising as expected for any handler, before possible nested
4126 faults to make sure all the contexts in a chain have been adjusted by
4127 the time we propagate.
4128
41292007-08-14 Pascal Obry <obry@adacore.com>
4130
4131 * s-osinte-mingw.ads: Add support for Ada.Execution_Time on Windows.
4132 (SYSTEM_INFO): New record.
4133 (SetThreadIdealProcessor): New imported routine needed for supporting
4134 task_info pragma on Windows.
4135
4136 * s-taprop-mingw.adb (Enter_Task): Check if CPU number given in task
4137 info can be applied to the current host.
4138 (Create_Task): Set the ideal processor if information is present.
4139
4140 * s-tasinf-mingw.adb, s-tasinf-mingw.ads,
4141 a-exetim-mingw.adb, a-exetim-mingw.ads: New files.
4142
41432007-08-14 Olivier Hainque <hainque@adacore.com>
4144
4145 * s-taprop-linux.adb (Get_Stack_Attributes): New subprogram. Fetch the
4146 stack size and initial stack pointer value for a given task.
4147 (Enter_Task): Get the stack attributes of the task we are entering and
4148 let the stack checking engine know about them.
4149
4150 * s-stchop.adb, s-stchop.ads (Notify_Stack_Attributes): New subprogram.
4151 Let the stack-checking engine know about the initial sp value and stack
4152 size associated with the current task.
4153 (Set_Stack_Info): If a stack base has been notified for the current
4154 task, honor it. Fallback to the previous less accurate method otherwise.
4155
4156 * s-stchop-vxworks.adb (Notify_Stack_Attributes): Dummy body.
4157
41582007-08-14 Ed Schonberg <schonberg@adacore.com>
4159
4160 * sem_ch10.adb: Create a limited view of an incomplete type, to make
4161 treatment of limited views uniform for all visible declarations in a
4162 limited_withed package.
4163 Set flag indicating that a subprogram body for a child unit has a
4164 generated spec.
4165 (Analyze_Compilation_Unit): If unit is a subprogram body that has no
4166 separate declaration, remove the unit name from visibility after
4167 compilation, so that environment is clean for subsequent compilations.
4168 (Install_Limited_Context_Clauses): Do not install a
4169 limited_private_with_clause unless the current unit is a body or a
4170 private child unit.
4171 (Analyze_Subunit, Install_Parents): Treat generic and non-generic units
4172 in the same fashion.
4173 (Install_Limited_Withed_Unit): Do not install a limited with clause if
4174 it applies to the declaration of the current package body.
4175 (Remove_Private_With_Clauses): If there is a regular with_clause for
4176 the unit, delete Private_With_Clause from context, to prevent improper
4177 hiding when processing subsequent nested packages and instantiations.
4178
41792007-08-14 Jose Ruiz <ruiz@adacore.com>
4180
4181 * adaint.c (__gnat_is_absolute_path): For VxWorks systems we accept
4182 dir/file, device:/dir/file, and device:drive_letter:/dir/file as
4183 representing absolute path names.
4184 __gnat_set_file_time_name [VMS]: Fix some 64/32 bit issues.
4185
4186 * cstreams.c (__gnat_full_name for VxWorks): Use
4187 __gnat_is_absolute_path to detect whether we need to add the current
4188 directory to normalize the path.
4189
41902007-08-14 Javier Miranda <miranda@adacore.com>
4191
4192 * a-tags.ads,
4193 a-tags.adb (Displace): Associate a message with the raised CE
4194 exception.
4195 (To_Addr_Ptr, To_Address, To_Dispatch_Table_Ptr,
4196 To_Object_Specific_Data_Ptr To_Predef_Prims_Ptr,
4197 To_Tag_Ptr, To_Type_Specific_Data_Ptr): Moved here from the package
4198 spec.
4199 (Default_Prim_Op_Count): Removed.
4200 (IW_Membership, Get_Entry_Index, Get_Offset_Index, Get_Prim_Op_Kind,
4201 Register_Tag, Set_Entry_Index, Set_Offset_To_Top, Set_Prim_Op_Kind):
4202 Remove pragma Inline_Always.
4203
4204 * rtsfind.ads (Default_Prim_Op_Count): Removed
4205 (Max_Predef_Prims): New entity
4206 (RE_Expanded_Name): Removed
4207 (RE_HT_Link): Removed
4208 (RE_Iface_Tag): Remmoved
4209 (RE_Ifaces_Table): Removed
4210 (RE_Interfaces_Array): Removed
4211 (RE_Interface_Data_Element): Removed
4212 (RE_Nb_Ifaces): Removed
4213 (RE_RC_Offset): Removed
4214 (RE_Static_Offset_To_Top): Removed
4215
4216 * exp_atag.ads, exp_atag.adb (Build_Inherit_Prims): Addition of a new
4217 formal.
4218 (Build_Inherit_Predefined_Prims): Replace occurrences of Default_
4219 Prim_Op_Count by Max_Predef_Prims.
4220
42212007-08-14 Thomas Quinot <quinot@adacore.com>
4222 Vincent Celier <celier@adacore.com>
4223
4224 * binde.adb (Elab_All_Links): Remove unnecessary call to
4225 Generic_Separately_Compiled (if a unit satisfies this predicate, there
4226 won't be an associated Afile).
4227 (Elab_All_Links): Fail if a referenced unit cannot be found
4228
4229 * bindgen.adb:
4230 Fix comments in bindgen regarding consistency checks done in Bcheck:
4231 the checks are made across units within a partition, not across several
4232 partitions.
4233 Fix generation of C binder file for VxWorks.
4234
4235 * lib.ads, lib.adb (Generic_Separately_Compiled): Rename to
4236 Generic_May_Lack_ALI, more descriptive of the current use of the
4237 predicate, and update documentation.
4238
4239 * lib-writ.ads, lib-writ.adb (Write_With_Lines): Minor code
4240 reorganization and documentation update for the case of predefined
4241 library generics (for which we do not reference an Afile).
4242
42432007-08-14 Robert Dewar <dewar@adacore.com>
4244
4245 * s-intman-irix.adb, s-osinte-irix.adb, s-osinte-irix.ads,
4246 s-proinf-irix-athread.ads, s-osinte-hpux-dce.adb, s-osinte-hpux-dce.ads,
4247 s-parame-hpux.ads, s-intman-dummy.adb, s-tasinf-solaris.adb,
4248 s-tasinf-solaris.ads, s-asthan-vms-alpha.adb, s-inmaop-vms.adb,
4249 s-intman-vms.adb, s-intman-vms.ads, s-osprim-mingw.adb,
4250 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-intman-vxworks.ads,
4251 s-intman-vxworks.ads, s-intman-vxworks.adb, s-parame-vxworks.ads,
4252 s-tfsetr-vxworks.adb, s-interr.adb, s-interr.ads, a-tasatt.adb,
4253 exp_ch13.adb, s-htable.ads, s-imgboo.ads, s-imglli.ads, s-imgllu.ads,
4254 s-imguns.ads, g-eacodu.adb, par-ch12.adb, s-stache.ads, s-stausa.adb,
4255 s-poosiz.adb, s-parame.ads, s-mastop.ads, s-osinte-darwin.ads,
4256 a-chtgke.adb, s-asthan-vms-alpha.adb, s-parame-vms-alpha.ads,
4257 s-parame-vms-ia64.ads, s-parame-vxworks.adb, s-except.ads,
4258 g-altcon.adb: Minor reformatting
4259
4260 ada-tree.h: Delete empty line.
4261
4262 ali.ads: Minor reformatting
4263 Clarification of comments.
4264 Minor spelling correction
4265
4266 * exp_dbug.adb: Add Warnings Off to suppress new warning
4267
4268 * a-witeio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
4269 formal
4270
4271 * a-strunb.adb (Set_Unbounded_String): Avoid memory leak by freeing old
4272 value
4273
4274 * a-textio.adb (Write): Remove an unnecessary IN OUT mode from
4275
4276 * a-textio.ads: Reorder the standard input/output/error declarations
4277 for consistency.
4278
4279 * g-dirope.adb, g-dirope.ads: Change Dir to mode IN for Open call
4280
4281 * par-ch2.adb: Recognize RM specially in errout
4282 Change 'R'M to RM in all error messages
4283
4284 * scng.adb: Recognize RM specially in errout
4285
4286 * sem.ads, sem.adb, exp_strm.adb, exp_ch5.ads, expander.adb: Rename
4287 N_Return node to be N_Simple_Return, to reflect Ada 2005 terminology.
4288
4289 * s-direio.adb: Add missing routine header box.
4290
4291 * sem_attr.ads: Add ??? comments
4292
4293 * sem_eval.adb: Recognize RM specially in errout
4294 Change 'R'M to RM in all error messages
4295
4296 * sem_maps.adb, sem_maps.ads: Remove some unnecessary IN OUT modes
4297
4298 * s-tasinf.ads: Fix minor comment typo.
4299
4300 * a-cihama.adb: Minor comment addition
4301
4302 * a-ztexio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
4303 formal
4304
4305 * s-tasinf-tru64.ads: Fix minor comment typo.
4306
4307 * itypes.ads: Comment update.
4308
4309 * ali-util.adb: Remove Generic_Separately_Compiled guard, not needed
4310 anymore.
4311
4312 * argv.c: Added protection against null gnat_argv and gnat_envp.
4313
4314 * bcheck.adb (Check_Consistency): Use correct markup character ({) in
4315 warning message when Tolerate_Consistency_Errors is True.
4316
4317 * cstand.adb (Create_Standard): Do not call Init_Size_Alignment for
4318 Any_Id, as this subprogram is only applicable to *type* entities (it
4319 sets RM_Size). Instead initialize just Esize and Alignment.
4320
43212007-08-14 Bob Duff <duff@adacore.com>
4322
4323 * a-cihama.ads, a-cidlli.ads, a-chtgop.ads, a-chtgop.adb, a-cdlili.ads,
4324 a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
4325 a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorse.ads, a-cohama.ads,
4326 a-cohata.ads, a-convec.adb, a-coinve.ads, a-coinve.adb, a-convec.ads,
4327 a-coorse.ads (Next): Applied pragma Inline.
4328 Make all Containers packages Remote_Types (unless they are already
4329 Pure).
4330 (Previous): applied pragma Inline
4331 (Elements_Type): is now a record instead of an array
4332
43332007-08-14 Thomas Quinot <quinot@adacore.com>
4334
4335 * table.adb, g-table.adb, g-dyntab.adb (Append): Reimplement in terms
4336 of Set_Item.
4337 (Set_Item): When the new item is an element of the currently allocated
4338 table passed by reference, save a copy on the stack if we're going
4339 to reallocate. Also, in Table.Set_Item, make sure we test the proper
4340 variable to determine whether to call Set_Last.
4341
4342 * sinput-d.adb, sinput-l.adb, stringt.adb, switch-m.adb,
4343 symbols-vms.adb, symbols-processing-vms-alpha.adb,
4344 symbols-processing-vms-ia64.adb, sem_elab.adb, repinfo.adb: Replace
4345 some occurrences of the pattern
4346 T.Increment_Last;
4347 T.Table (T.Last) := Value;
4348 with a cleaner call to
4349 T.Append (Value);
4350
43512007-08-14 Ed Schonberg <schonberg@adacore.com>
4352 Gary Dismukes <dismukes@adacore.com>
4353 Thomas Quinot <quinot@adacore.com>
4354
4355 * sem_ch12.ads, sem_ch12.adb (Instantiate_Type): If the formal is a
4356 derived type with interface progenitors use the analyzed formal as the
4357 parent of the actual, to create renamings for all the inherited
4358 operations in Derive_Subprograms.
4359 (Collect_Previous_Instances): new procedure within of
4360 Load_Parent_Of_Generic, to instantiate all bodies in the compilation
4361 unit being loaded, to ensure that the generation of global symbols is
4362 consistent in different compilation modes.
4363 (Is_Tagged_Ancestor): New function testing the ancestor relation that
4364 takes progenitor types into account.
4365 (Validate_Derived_Type_Instance): Enforce the rule of 3.9.3(9) by
4366 traversing over the primitives of the formal and actual types to locate
4367 any abstract subprograms of the actual type that correspond to a
4368 nonabstract subprogram of the formal type's ancestor type(s), and issue
4369 an error if such is found.
4370 (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation,
4371 Instantiate_Package_Body, Instantiate_Subprogram_Body):
4372 Remove bogus guard around calls to Inherit_Context.
4373 (Reset_Entity): If the entity is the selector of a selected component
4374 that denotes a named number, propagate constant-folding to the generic
4375 template only if the named number is global to the generic unit.
4376 (Set_Instance_Env): Only reset the compilation switches when compiling
4377 a predefined or internal unit.
4378
43792007-08-14 Ed Schonberg <schonberg@adacore.com>
4380
4381 * sem_ch4.adb (Try_Class_Wide_Operation): use base type of first
4382 parameter to determine whether operation applies to the prefix.
4383 (Complete_Object_Operation): If actual has an access type and
4384 controlling formal is not an in_parameter, reject the actual if it is
4385 an access_to_constant type.
4386 (Try_Primitive_Operation): If the type of the prefix is a formal tagged
4387 type, the candidate operations are found in the scope of declaration of
4388 the type, because the type has no primitive subprograms.
4389 (Analyze_Selected_Component): If prefix is class-wide, and root type is
4390 a private extension, only examine visible components before trying to
4391 analyze as a prefixed call.
4392 Change Entity_List to Type_To_Use, for better readability.
4393 (Has_Fixed_Op): Use base type when checking whether the type of an
4394 operator has a user-defined multiplication/division
4395 (Check_Arithmetic_Pair): Use Ada 2005 rules to remove ambiguities when
4396 user-defined operators are available for fixed-point types.
4397
43982007-08-14 Thomas Quinot <quinot@adacore.com>
4399 Ed Schonberg <schonberg@adacore.com>
4400
4401 * sem_cat.ads, sem_cat.adb (Has_Stream_Attribute_Definition): New
4402 formal At_Any_Place indicating, when True, that we want to test for
4403 availability of the stream attribute at any place (as opposed to the
4404 current visibility context only).
4405 (Missing_Read_Write_Attributes): A stream attribute is missing for the
4406 purpose of enforcing E.2.2(8) only if it is not available at any place.
4407 Take into account the Ada2005 pragma Has_Preelaborable_Initialization
4408 when checking the legality of an extension aggregate in a preelaborable
4409 package. Treat the literal null as a valid default expression in a
4410 component declaration for a type with preelaborable initialization.
4411 A limited interface is a legal progenitor for the designated type of a
4412 remote access to class-wide type.
4413
44142007-08-14 Thomas Quinot <quinot@adacore.com>
4415 Ed Schonberg <schonberg@adacore.com>
4416
4417 * sem_ch8.ads, sem_ch8.adb (Find_Type, case of a 'Base attribute
4418 reference): Use correct entity as denoted entity for the selector of
4419 the rewritten node.
4420 (Find_Direct_Name): Add comment about Generate_Reference incorrectly
4421 setting the Referenced_As_LHS flag for entities that are implicitly
4422 dereferenced.
4423 (Find_Type): If the type is an internally generated incomplete type,
4424 mark the full view as referenced, to prevent spurious warnings.
4425 (Find_Selected_Component, Has_Components): Handle properly non-limited
4426 views that are themselves incomplete types.
4427 Handle interfaces visible through limited-with clauses.
4428 (Analyze_Subprogram_Renaming): Disambiguate and set the entity of a
4429 subprogram generic actual for which we have generated a renaming.
4430 Warn when the renaming introduces a homonym of
4431 the renamed entity, and the renamed entity is directly visible.
4432
44332007-08-14 Ed Schonberg <schonberg@adacore.com>
4434 Hristian Kirtchev <kirtchev@adacore.com>
4435
4436 * sem_res.adb (Resolve_Allocator): Propagate any coextensions that
4437 appear in the subtree to the current allocator if it is not a static
4438 coextension.
4439 (Resolve_Allocator): Perform cleanup if resolution has determined that
4440 the allocator is not a coextension.
4441 (Resolve): Skip an interpretation hidden by an abstract operator only
4442 when the type of the interpretation matches that of the context.
4443 (Resolve): When looping through all possible interpretations of a node,
4444 do not consider those that are hidden by abstract operators.
4445 (Resolve_Actuals): When verifying that an access to class-wide object
4446 is an actual for a controlling formal, ignore anonymous access to
4447 subprograms whose return type is an access to class_wide type.
4448 (Resolve_Slice): If the prefix of the slice is a selected component
4449 whose type depends on discriminants, build its actual subtype before
4450 applying range checks on the bounds of the slice.
4451 (Valid_Conversion): In an instance or inlined body, compare root types,
4452 to prevent anomalies between private and public views.
4453 (Resolve): Improve error message for ambiguous fixed multiplication
4454 expressions that involve universal_fixed multiplying operations.
4455
44562007-08-14 Javier Miranda <miranda@adacore.com>
4457 Hristian Kirtchev <kirtchev@adacore.com>
4458
4459 * exp_ch9.adb (Build_Protected_Entry): Propagate the original source
4460 location to allow the correct generation of errors in case of
4461 restrictions applied to the expanded code.
4462 (Expand_Entry_Barrier): Remove all generated renamings for a barrier
4463 function if the condition does not reference them.
4464 (Expand_Entry_Body_Declarations): Mark the index constant as having a
4465 valid value.
4466
44672007-08-14 Thomas Quinot <quinot@adacore.com>
4468
4469 * exp_dist.adb (PolyORB_Support.Build_TypeCode_Function): When creating
4470 typecode parameters for a union (in a variant record), remove
4471 extraneous layer of Any wrapping for member label.
4472 (Expand_Receiving_Stubs_Bodies): For an RCI package body that has
4473 elabration statements, register the package with the name server
4474 at the beginning, not at the end, of the elaboration statements so
4475 that they can create remote access to subprogram values that designate
4476 remote subprograms from the package.
4477
44782007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
4479
4480 * g-catiio.adb (Image): For the case of %s, use Ada.Calendar.Time
4481 values to compute the number of seconds since the Unix Epoc in order to
4482 account for Daylight Savings Time. Perform special processing for dates
4483 that are earlier than the Unix Epoc to obtain a negative number.
4484
44852007-08-14 Emmanuel Briot <briot@adacore.com>
4486
4487 * g-comlin.adb (Getopt): Fix handling of "*" switch when not collapsing
4488 switches.
4489
44902007-08-14 Eric Botcazou <ebotcazou@adacore.com>
4491
4492 * gnatlink.adb (Gnatlink): Pass switches to the linker even if the
4493 binder-generated file is not in Ada.
4494 Pass -mrtp to the linker if it is GCC and --RTS=rtp has been
4495 recorded in the ALI file.
4496 Pass -fsjlj to the linker if it is GCC and --RTS=sjlj has been recorded.
4497
44982007-08-14 Vincent Celier <celier@adacore.com>
4499
4500 * gnatls.adb: (Corresponding_Sdep_Entry): Always return a value
4501 (Output_Source): Do nothing if parameter is No_Sdep_Id
4502
4503 * make.adb (Gnatmake): Do not rebuild an archive simply because a
4504 shared library it imports has a later time stamp.
4505 (Check): Resolve the symbolic links in the path name of the object
4506 directory.
4507 Check that the ALI file is in the correct object directory
4508 Check if a file name does not correspond to the mapping of units
4509 to file names.
4510 (Display_Version): New procedure
4511 (Initialize): Process switches --version and --help
4512 Use type Path_Name_Type for path name
4513
45142007-08-14 Paul Hilfinger <hilfinger@adacore.com>
4515
4516 * impunit.adb: Re-organize System.Random_Numbers and
4517 GNAT.Random_Numbers and add to builds.
4518
4519 * Makefile.rtl: Add s-rannum.ad* and g-rannum.ad*, a-assert*
4520
4521 * s-rannum.ads, s-rannum.adb, g-rannum.ads, g-rannum.adb: New files.
4522
4523 * a-assert.ads, a-assert.adb: New files.
4524
45252007-08-14 Gary Dismukes <dismukes@adacore.com>
4526
4527 * layout.adb (Layout_Type): In the case of access-to-subprogram types,
4528 if AAMP_On_Target is True, then the size of the type encompasses two
4529 addresses (a static link and a subprogram address), except in the case
4530 of library-level access types.
4531
45322007-08-14 Vincent Celier <celier@adacore.com>
4533
4534 * output.ads, output.adb (Write_Eol): Remove trailing spaces before
4535 writing the line.
4536 (Write_Eol_Keep_Blanks): New procedure to write a line, including
4537 possible trailing spaces.
4538 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
4539
45402007-08-14 Javier Miranda <miranda@adacore.com>
4541
4542 * par-ch6.adb (P_Formal_Part): Fix wrong error message associated with
4543 null-excluding access types.
4544
45452007-08-14 Javier Miranda <miranda@adacore.com>
4546
4547 * sem_ch9.adb (Check_Interfaces): New subprogram that factorizes code
4548 that is common to Analyze_Protected_Type and Analyze_Task_Type. In case
4549 of private types add missing check on matching interfaces in the
4550 partial and full declarations.
4551 (Analyze_Protected_Type): Code cleanup.
4552 (Analyze_Task_Type): Code cleanup.
4553
45542007-08-14 Javier Miranda <miranda@adacore.com>
4555
4556 * sem_disp.adb (Check_Dispatching_Operation): Do not emit warning on a
4557 generated interface thunk.
4558
45592007-08-14 Ed Schonberg <schonberg@adacore.com>
4560
4561 * s-ficobl.ads: Declare AFCB as a tagged incomplete type, to prevent
4562 obsolescent warning on application of 'Class to an incomplete type.
4563
4564 * s-finroo.ads: Declare Root_Controlled as a tagged incomplete type, to
4565 prevent obsolescent warning on application of 'Class to an incomplete
4566 type.
4567
45682007-08-14 Pascal Obry <obry@adacore.com>
4569
4570 * s-fileio.adb (Is_Open): Add check for usability of the underlying
4571 file stream.
4572
45732007-08-14 Cyrille Comar <comar@adacore.com>
4574
4575 * s-finimp.adb (Detach_From_Final_List): make this procedure idempotent
4576 since it is potentially used in cases implying double finalization of
4577 the same object.
4578
45792007-08-14 Jose Ruiz <ruiz@adacore.com>
4580
4581 * s-tasini.adb (Get_Stack_Info): Move this function to
4582 System.Soft_Links.Tasking because it is common to the full and the
4583 restricted run times.
4584 (Init_RTS): Do not set the Get_Stack_Info soft link because it is done
4585 in SSL.Tasking.Init_Tasking_Soft_Links.
4586
4587 * s-solita.adb (Get_Stack_Info): Function moved from
4588 System.Tasking.Initialization because it is common to the full and the
4589 restricted run times.
4590 (Init_Tasking_Soft_Links): Set the tasking soft link for Get_Stack_Info.
4591
45922007-08-14 Arnaud Charlet <charlet@adacore.com>
4593
4594 * s-tpobop.ads, s-tpobop.adb, s-tasren.ads, s-tasren.adb,
4595 s-taskin.ads (Requeue_With_Abort): Rename field With_Abort.
4596 (PO_Do_Or_Queue, Task_Do_Or_Queue, Requeue_Call): Remove With_Abort
4597 parameter.
4598
4599 * s-tassta.adb (Task_Wrapper): Increased value of the small overflow
4600 guard to 12K.
4601
46022007-08-14 Gary Dismukes <dismukes@adacore.com>
4603
4604 * s-veboop.adb (SU): New named number initialized to
4605 System.Storage_Unit.
4606 (True_Val): The initialization expression is revised to use SU (=
4607 Storage_Unit) rather than assuming 8 for the component size of an
4608 unpacked Boolean array.
4609
46102007-08-14 Tristan Gingold <gingold@adacore.com>
4611
4612 * tracebak.c: Use tb-ivms.c on OpenVMS Itanium.
4613
4614 * tb-ivms.c: New file.
4615
4616 * g-trasym-vms-ia64.adb: Fixed for OpenVMS version 8.2
4617
46182007-08-14 Geert Bosch <bosch@adacore.com>
4619
4620 * i-forbla.ads, i-forbla.adb, a-ngcoar.adb, a-ngcoar.ads, i-forlap.ads,
4621 s-gearop.adb, s-gecobl.adb, s-gecobl.ads, s-gerela.adb, s-gerela.ads:
4622 Add required linker pragmas for automatically linking with the gnalasup
4623 linear algebra support library, and the systems math library.
4624 Rename cdot to cdotu and zdot to zdotu.
4625 Update header comment to describe purpose of package.
4626
46272007-08-14 Thomas Quinot <quinot@adacore.com>
4628
4629 * exp_ch7.adb (Find_Final_List): For an anonymous access type that has
4630 an explicitly specified Associated_Final_Chain, use that list.
4631 (Expand_N_Package_Body): Build dispatch tables of library level tagged
4632 types.
4633 (Expand_N_Package_Declaration): Build dispatch tables of library level
4634 tagged types. Minor code cleanup.
4635
46362007-08-14 Vincent Celier <celier@adacore.com>
4637
4638 * gnatchop.adb (Terminate_Program): Remove exception and use
4639 Types.Terminate_Program instead.
4640
4641 * osint.ads, osint.adb (Current_Exit_Status): New global variable
4642 (Find_Program_Name): Added protection against empty name.
4643 (OS_Exit_Through_Exception): New procedure
4644
4645 * s-os_lib.ads, s-os_lib.adb (OS_Exit): New procedure body
4646 (OS_Exit_Default): New procedure that contains the previous
4647 implementation of procedure OS_Exit.
4648 (Final_Value): Remove obsolete Interix stuff.
4649
46502007-08-14 Thomas Quinot <quinot@adacore.com>
4651
4652 * g-socket.ads: Reorganize example code so that it also works on
4653 Windows XP.
4654
46552007-08-14 Tristan Gingold <gingold@adacore.com>
4656
4657 * g-trasym.ads: AIX now supports symbolic backtraces.
4658
46592007-08-14 Ed Schonberg <schonberg@adacore.com>
4660
4661 * lib-load.adb (From_Limited_With_Chain): Always scan the stack of
4662 units being loaded to detect circularities. A circularity may be
4663 present even if the current chain of pending units to load starts from
4664 a limited_with_clause.
4665
4666 * lib-load.ads: Change profile of Load_Unit to use a with_clause
4667 rather than a boolean flag, in order to detect circularities in
4668 with_clauses.
4669
4670 * par-load.adb: Use current with_clause in calls to Load_Unit, rather
4671 than propagating the From_Limited_With flag, in order to handle
4672 properly circularities involving with_clauses.
4673
46742007-08-14 Nicolas Setton <setton@adacore.com>
4675
4676 * link.c (FreeBSD): Add "const" keyword where needed, to eliminate
4677 warnings.
4678
46792007-08-14 Arnaud Charlet <charlet@adacore.com>
4680
4681 * Makefile.in: GNATRTL_LINEARALGEBRA_OBJS: New variable holding objects
4682 to build for libgnala.
4683 libgnat: Add rules to build libgnala.a
4684 (LIBGNAT_TARGET_PAIRS for VxWorks): Remove s-osinte-vxworks.adb from
4685 target pairs of the VxWorks 6 kernel runtime, use it only for VxWorks 5.
4686 Add s-osinte-vxworks-kernel.adb to the target pairs of the
4687 kernel run-time lib for VxWorks 6, which would provide a different
4688 implementation for Task_Cont and Task_Stop than the VxWorks 5 version.
4689 x86-solaris section (EH_MECHANISM): Set to -gcc, as this port is now
4690 running ZCX by default.
4691 Add g-sttsne-locking to LynxOS version.
4692 Remove g-sttsne-vxworks.ads; use g-sttsne-locking.ads instead.
4693 On x86/darwin, use a-numaux-x86.ad? and system-darwin-x86.ads.
4694
4695 * system-darwin-x86.ads: New file.
4696
4697 * Make-lang.in: Delete files before copying onto them, so if they are
4698 read-only, the copy won't fail.
4699 Update dependencies
4700
47012007-08-14 Pascal Obry <obry@adacore.com>
4702
4703 * mdll-fil.adb, * mdll.adb: Implement a more consistent libraries
4704 naming scheme.
4705
47062007-08-14 Vincent Celier <celier@adacore.com>
4707
4708 * mlib-utl.adb (Gcc_Name): Change from constant String to String_Access
4709 (Gcc): Initialize Gcc_Name at the first call
4710
47112007-08-14 Ed Schonberg <schonberg@adacore.com>
4712
4713 * sem_ch7.adb (Analyze_Package_Specification): Do not install private
4714 with_clauses of the enclosing unit when analyzing the package
4715 specification of a nested instance.
4716
47172007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
4718
4719 * sinfo.ads, sinfo.adb (Is_Coextension, Set_Is_Coextension): Removed.
4720 (Is_Dynamic_Coextension, Set_Is_Dynamic_Coextension): New routines.
4721 Remove flag Is_Coextension. Add flag Is_Dynamic_Coextension. Update the
4722 layout of N_Allocator.
4723
47242007-08-14 Thomas Quinot <quinot@adacore.com>
4725
4726 * rtsfind.adb (Check_RPC): Add PCS version check.
4727
4728 * gnatvsn.ads, gnatvsn.adb: Add PCS version.
4729 (Gnat_Free_Software): New function.
4730
4731 * sem_dist.ads, sem_dist.adb (Get_PCS_Version): New subprogram. Returns
4732 the PCS_Version value from s-parint, used to check that it is consistent
4733 with what exp_dist expects.
4734
4735 * s-parint.ads (PCS_Version): New entity for checking consistency
4736 between exp_dist and PCS.
4737
4738 * gen-soccon.c: (SO_REUSEPORT): New constant.
4739
47402007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
4741
4742 * a-calfor.adb (Image (Duration; Boolean)): Change type of local
4743 variable Sub_Second to Duration in order to accomodate a larger range
4744 of arithmetic operations.
4745
47462007-08-14 Bob Duff <duff@adacore.com>
4747
4748 * g-sttsne-locking.ads: Move comments from spec to body.
4749 * g-sttsne-locking.adb: Move comments from spec to body.
4750 * g-sttsne-vxworks.ads: Removed.
4751 * g-sttsne-vxworks.adb: Removed.
4752
4862826d
ILT
47532007-08-11 Ian Lance Taylor <iant@google.com>
4754
4755 * misc.c (gnat_get_alias_set): Change return type to
4756 alias_set_type.
4757
4d8a9bfe
KG
47582007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4759
4760 * decl.c, utils2.c: Fix whitespace in last change.
4761
39595763
KG
47622007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4763
4764 * decl.c (compare_field_bitpos): Constify.
4765 * utils2.c (compare_elmt_bitpos): Likewise.
4766
08e7e8cb
AJ
47672007-07-27 Aurelien Jarno <aurelien@aurel32.net>
4768
4769 * s-osinte-kfreebsd-gnu.ads ((sigset_t_ptr): Removed, replaced by
4770 anonymous access type.
4771 (pthread_sigmask): Now take an access sigset_t.
4772
83983455
JS
47732007-07-05 Joel Sherrill <joel.sherrill@oarcorp.com>
4774
4775 * s-osinte-rtems.ads: Correct prototype of pthread_sigmask.
4776
a8257e58
EB
47772007-06-21 Eric Botcazou <ebotcazou@adacore.com>
4778
4779 PR tree-optimization/25737
4780 * misc.c (gnat_post_options): Do not force flag_tree_salias to 0.
4781
5be014d5
AP
47822007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4783
4784 * trans.c (Attribute_to_gnu): When subtracting an
4785 offset from a pointer, use POINTER_PLUS_EXPR with
4786 NEGATE_EXPR instead of MINUS_EXPR.
4787 (gnat_to_gnu): Likewise.
4788 * utils.c (convert): When converting between
4789 thin pointers, use POINTER_PLUS_EXPR and sizetype
4790 for the offset.
4791 * utils2.c (known_alignment): POINTER_PLUS_EXPR
4792 have the same semantics as PLUS_EXPR for alignment.
4793 (build_binary_op): Add support for the semantics of
4794 POINTER_PLUS_EXPR's operands.
4795 When adding an offset to a pointer, use POINTER_PLUS_EXPR.
4796
b0464c88
RE
47972007-06-11 Rafael Avila de Espindola <espindola@google.com>
4798
a472f546
EB
4799 * trans.c (Attribute_to_gnu): Use signed_or_unsigned_type_for instead
4800 of get_signed_or_unsigned_type.
b0464c88
RE
4801 * misc.c (LANG_HOOKS_SIGNED_TYPE): Remove.
4802
93e17a25
BD
48032007-06-11 Bob Duff <duff@adacore.com>
4804 Thomas Quinot <quinot@adacore.com>
4805
4806 * g-stsifd-sockets.adb (Create): Work around strange behavior of
4807 'bind' on windows that causes 'connect' to fail intermittently, by
4808 retrying the 'bind'.
4809 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
4810
1bbf8502
DS
48112007-06-10 Duncan Sands <baldrick@free.fr>
4812
4813 * decl.c (gnat_to_gnu_entity): Use pointers to dummy nodes, rather
4814 than to void, for the fields when making a new fat pointer type.
4815 (gnat_substitute_in_type): Now substitute_in_type.
a472f546 4816 * gigi.h (gnat_substitute_in_type): Likewise. Adjust recursive calls.
1bbf8502
DS
4817 * trans.c (gnat_gimplify_expr): Remove COMPONENT_REF kludge.
4818 * utils.c (update_pointer_to): Update fat pointers by updating the
4819 dummy node pointers used for the fields.
4820
ec11296f
AC
48212007-06-06 Thomas Quinot <quinot@adacore.com>
4822 Bob Duff <duff@adacore.com>
4823
4824 * g-soccon-freebsd.ads, g-soccon-vxworks.ads:,
4825 g-soccon-aix.ads, g-soccon-irix.ads, g-soccon-hpux.ads,
4826 g-soccon-solaris.ads, g-soccon-vms.ads, g-soccon-tru64.ads: Add new
4827 constant Thread_Blocking_IO, always True by default, set False
4828 on a per-runtime basis.
4829 (Need_Netdb_Buffer): New constant.
4830
4831 * g-stheme.adb, g-sttsne.ads, g-sttsne-locking.ads,
4832 g-sttsne-locking.adb, g-sttsne-vxworks.ads, g-sttsne-vxworks.adb: New
4833 files.
4834
4835 * g-socthi-vxworks.ads, g-socthi-vxworks.adb,
4836 g-socthi-vms.ads, g-socthi-vms.adb (Safe_Gethostbyname,
4837 Safe_Gethostbyaddr, Safe_Getservbyname, Safe_Getservbyport): Use new
4838 child package Task_Safe_NetDB
4839 (Host_Error_Messages): Add stub body.
4840 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
4841
4842 * g-soccon-mingw.ads: Add Windows-specific constants.
4843 (Need_Netdb_Buffer): New constant.
4844 (GNAT.Sockets.Thin.C_Inet_Addr, Windows version): Remove useless Ada
4845 wrapper and import inet_addr(3) from the standard sockets library
4846 directly instead.
4847 (In_Addr): Add alignment clause.
4848 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
4849
48502007-06-06 Robert Dewar <dewar@adacore.com>
4851
4852 * a-taster.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
4853 s-osinte-irix.ads, s-interr-sigaction.adb, s-mastop-irix.adb,
4854 s-osinte-hpux-dce.ads, s-osinte-interix.ads, s-osinte-solaris.ads,
4855 s-taspri-solaris.ads, s-inmaop-vms.adb, s-interr-vms.adb,
4856 s-mastop-vms.adb, s-osinte-vms.ads, s-tpopde-vms.adb,
4857 s-osinte-mingw.ads, s-interr-vxworks.adb, i-cstrea-vms.adb,
4858 a-diocst.adb, a-direio.adb, a-interr.adb, a-sequio.adb, a-siocst.adb,
4859 a-ssicst.adb, a-storio.adb, a-ststio.adb, a-stwima.adb, a-tasatt.adb,
4860 a-taside.adb, a-tiocst.adb, a-witeio.adb, a-wtcstr.adb, g-crc32.adb,
4861 g-dirope.adb, g-dyntab.adb, g-memdum.adb, g-regexp.adb, g-spipat.adb,
4862 g-spitbo.adb, g-string.adb, g-string.ads, g-table.adb, g-thread.adb,
4863 i-cobol.adb, i-cpoint.adb, i-cstrea.adb, i-cstrin.adb, i-pacdec.adb,
4864 s-addima.adb, s-arit64.adb, s-auxdec.adb, s-auxdec.ads,
4865 s-auxdec-vms_64.ads, s-carsi8.adb, s-carun8.adb, s-casi16.adb,
4866 s-casi32.adb, s-casi64.adb, s-caun16.adb, s-caun32.adb, s-caun64.adb,
4867 s-direio.adb, s-fileio.adb, s-finimp.ads, s-geveop.adb, s-imgenu.adb,
4868 s-pack03.adb, s-pack05.adb, s-pack06.adb, s-pack07.adb, s-pack09.adb,
4869 s-pack10.adb, s-pack11.adb, s-pack12.adb, s-pack13.adb, s-pack14.adb,
4870 s-pack15.adb, s-pack17.adb, s-pack18.adb, s-pack19.adb, s-pack20.adb,
4871 s-pack21.adb, s-pack22.adb, s-pack23.adb, s-pack24.adb, s-pack25.adb,
4872 s-pack26.adb, s-pack27.adb, s-pack28.adb, s-pack29.adb, s-pack30.adb,
4873 s-pack31.adb, s-pack33.adb, s-pack34.adb, s-pack35.adb, s-pack36.adb,
4874 s-pack37.adb, s-pack38.adb, s-pack39.adb, s-pack40.adb, s-pack41.adb,
4875 s-pack42.adb, s-pack43.adb, s-pack44.adb, s-pack45.adb, s-pack46.adb,
4876 s-pack47.adb, s-pack48.adb, s-pack49.adb, s-pack50.adb, s-pack51.adb,
4877 s-pack52.adb, s-pack53.adb, s-pack54.adb, s-pack55.adb, s-pack56.adb,
4878 s-pack57.adb, s-pack58.adb, s-pack59.adb, s-pack60.adb, s-pack61.adb,
4879 s-pack62.adb, s-pack63.adb, s-pooloc.adb, s-poosiz.adb, s-scaval.adb,
4880 s-sequio.adb, s-shasto.adb, s-stalib.ads, s-stratt.adb, s-strcom.adb,
4881 s-taasde.adb, s-tasdeb.adb, s-tasuti.ads, s-tataat.ads, s-tpoben.ads,
4882 s-valenu.adb, s-widenu.adb, s-wwdenu.adb, s-addope.adb, a-stzmap.adb,
4883 a-ztcstr.adb, a-ztexio.adb, s-osinte-linux-hppa.ads: Replace
4884 Unchecked_* by Ada.Unchecked_*
4885
48862007-06-06 Robert Dewar <dewar@adacore.com>
4887
4888 * g-string.adb, s-proinf-irix-athread.adb, s-gloloc-mingw.adb,
4889 s-tfsetr-default.adb, gnatfind.adb, gnatxref.adb, gprep.adb,
4890 g-regexp.adb, g-regexp.ads, g-regpat.ads, g-tasloc.adb, g-tasloc.ads,
4891 output.adb, switch-m.ads, tree_in.ads, tree_io.ads, indepsw.ads,
4892 g-utf_32.adb, g-utf_32.ads, a-wichun.adb, a-wichun.ads, a-zchuni.adb,
4893 a-zchuni.ads: Replace GNAT.xxx by System.xxx when appropriate.
4894
4895 * s-utf_32.adb, s-utf_32.ads, s-os_lib.adb, s-os_lib.ads, s-regexp.adb,
4896 s-regexp.ads, s-regpat.adb, s-regpat.ads, s-string.adb, s-string.ads,
4897 s-tasloc.adb, s-tasloc.ads: New files.
4898
48992007-06-06 Bob Duff <duff@adacore.com>
4900
4901 * g-expect-vms.adb:
4902 (Send_Signal, Close): Raise Invalid_Process if the process id is invalid.
4903 * g-expect.ads, g-expect.adb (Send): Avoid useless copy of the string.
4904 (Send_Signal, Close): Raise Invalid_Process if the process id is
4905 invalid.
4906 (Pattern_Matcher_Access): Is now a general access type to be able to
4907 use aliased string.
4908
49092007-06-06 Thomas Quinot <quinot@adacore.com>
4910 Arnaud Charlet <charlet@adacore.com>
4911
a472f546
EB
4912 * a-intnam-aix.ads: Adjust comment to account for SIGADAABORT change
4913 (SIGEMT is now used instead of SIGTERM on AIX).
ec11296f
AC
4914
4915 * s-osinte-aix.ads (Linker_Options): Use -pthread instead of -lpthreads.
4916 (Time_Slice_Supported): Set to True.
a472f546 4917 Use SIGEMT instead of SIGTERM as SIGADAABORT.
ec11296f
AC
4918
49192007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
4920
4921 * a-calend.ads, a-calend.adb, a-calend-vms.ads, a-calend-vms.adb ("-"
4922 (Time, Time)): Use To_Relative_Time rather than manual calculation to
4923 express the bounds of Duration as Time. Raise Time_Error when the
4924 result is greater or equal to the higher bound of Duration (on the
4925 margin case).
4926 ("+" (Time, Duration)): Reorder code. Remove the declaration of constant
4927 Ada_High_And_Leaps.
4928 ("-" (Time, Duration)): Reorder code. Remove the declaration of constant
4929 Ada_High_And_Leaps.
4930 ("-" (Time, Time)): Reorder code.
4931 (All_Leap_Seconds): Removed.
4932 (Arithmetic_Operations.Add): Remove sign related kludge.
4933 (Arithmetic_Operations.Difference): Control the leaps seconds processing
4934 with flag Leap_Support.
4935 (Arithmetic_Operations.Subtract): Remove sign related kludge.
4936 (Check_Within_Time_Bounds): New procedure.
4937 (Clock): Control the leap seconds processing with flag Leap_Support.
4938 (Cumulative_Leap_Seconds): Assert that the target supports leap seconds.
4939 (Formatting_Operations.Split): Control the leap seconds processing with
4940 flag Leap_Support.
4941 (Formatting_Operations.Time_Of): Control the leaps seconds processing
4942 with flag Leap_Support. Adjust the year, month and day (if applicable)
4943 when the value of day seconds designates a new day.
4944 (Split): Use parameter associations for better readability. Integrate
4945 flag Is_Ada_05.
4946 (Time_Of): Use parameter associations for better readability. Integrate
4947 flag Is_Ada_05.
4948
4949 * a-calfor.adb (Split): Use parameter associations for better
4950 readability. Integrate flag Is_Ada_05.
4951 (Time_Of): Remove flag Leap_Checks. Use parameter associations for
4952 better readability. Integrate flag Is_Ada_05.
4953
49542007-06-06 Arnaud Charlet <charlet@adacore.com>
4955
4956 * s-taprop-vms.adb, s-taprop-hpux-dce.adb, s-taprop-vxworks.adb,
4957 s-osprim-posix.adb, s-taprop-posix.adb, s-osprim-vxworks.adb,
4958 s-taprop-solaris.adb, s-osprim-solaris.adb, s-taprop-dummy.adb,
4959 s-osprim-unix.adb, s-osinte-freebsd.adb, s-osinte-freebsd.ads,
4960 s-osinte-lynxos.adb, s-osinte-lynxos.ads, s-taprop-tru64.adb,
4961 s-taprop-lynxos.adb, s-taprop-irix.adb, s-osinte-tru64.adb,
4962 s-osinte-tru64.ads, s-taprop-linux.adb, s-parame.ads,
4963 s-parame-vms-alpha.ads, s-parame-vms-ia64.ads, s-parame-hpux.ads,
4964 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-parame-vxworks.ads,
4965 s-taprop-mingw.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos-3.adb,
4966 s-osprim-mingw.adb (Timed_Delay, Timed_Sleep): Register the base
4967 time when entering this routine to detect a backward clock setting
4968 (manual setting or DST adjustment), to avoid waiting for a longer delay
4969 than needed.
4970 (Time_Duration, To_Timeval, struct_timeval): Removed when not relevant.
4971 Remove handling of deferred priority change, and replace by setting the
4972 task priority directly, as required by AI-188.
4973 Update comments.
4974 (Max_Task_Image_Length): New constant.
4975 Replace Warnings (Off) by Unreferenced pragma, cleaner.
4976 (Dynamic_Priority_Support): Removed, no longer needed.
4977 (Poll_Base_Priority_Change): Ditto.
4978 (Set_Ceiling): Add this procedure to change the ceiling priority
4979 associated to a lock. This is a dummy implementation because dynamic
4980 priority ceilings are not supported by the underlying system.
4981
4982 * a-dynpri.adb (Set_Priority): Take into account case where Target is
4983 accepting a RV with its priority boosted.
4984 Remove handling of deferred priority change, and replace by setting the
4985 task priority directly, as required by AI-188.
4986
4987 * s-taenca.adb (Try_To_Cancel_Entry_Call): Remove special case for
4988 Succeeded = True.
4989 Remove handling of deferred priority change, and replace by setting the
4990 task priority directly, as required by AI-188.
4991 (Wait_For_Completion, Wait_For_Call, Timed_Selective_Wait): Change state
4992 of Self_Id earlier.
4993
4994 * s-tasini.ads, s-tasini.adb (Wakeup_Entry_Caller): Relax assertion.
4995 (Poll_Base_Priority_Change): Removed.
4996 Code clean up: use SSL.Current_Target_Exception.
4997
4998 * s-tasren.adb (Task_Count): Call Yield to let a chance to other tasks
4999 to run as this is a potentially dispatching point.
5000 (Call_Synchronous): Use Local_Defer_Abort.
5001 (Callable): Relax assertion.
5002 (Selective_Wait): Relax assertion in case abort is not allowed.
5003 Remove handling of deferred priority change, and replace by setting the
5004 task priority directly, as required by AI-188.
5005
5006 * s-tasuti.adb (Make_Passive): Adjust assertions.
5007 Remove handling of deferred priority change, and replace by setting the
5008 task priority directly, as required by AI-188.
5009
50102007-06-06 Arnaud Charlet <charlet@adacore.com>
5011
5012 * system-vxworks-sparcv9.ads, system-solaris-x86.ads,
5013 system-irix-o32.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
5014 system-lynxos-x86.ads, system-vxworks-m68k.ads, system-linux-x86.ads,
5015 system-vxworks-mips.ads, system-vxworks-alpha.ads,
5016 system-vxworks-x86.ads, system-linux-ppc.ads, system-mingw.ads,
5017 system-vms-zcx.ads, system-darwin-ppc.ads, system-vxworks-ppc.ads,
5018 system-interix.ads, system-linux-hppa.ads, system-tru64.ads,
5019 system-hpux.ads, system-irix-n32.ads, system-solaris-sparc.ads,
5020 system-solaris-sparcv9.ads, system-vms.ads, system.ads,
5021 system-vms_64.ads, system-hpux-ia64.ads, system-linux-x86_64.ads,
5022 system-linux-ia64.ads: Document mapping between Ada and OS priorities.
5023 This patch changes the largest non-binary modulus from 2**31-1 to
5024 2**32-1.
5025 (Compiler_System_Version): Removed, no longer used.
5026 Clean up system files by removing flags only used on a single target.
5027 Also remove obsolete flags, only used during bootstrap from system.ads
5028 (Address): Add a pragma Preelaborable_Initialization.
5029
5030 * system-aix.ads: Ditto.
5031 (GCC_ZCX_Support): Set to true.
5032 Update priority range on AIX and map Ada priorities to target
5033 priorities appropriately for different scheduling policies.
5034
5035 * ttypes.ads: set largest non-binary modulus from 2**31-1 to 2**32-1
5036
50372007-06-06 Vincent Celier <celier@adacore.com>
5038
5039 * mlib-tgt-specific.adb, mlib-tgt-specific.ads,
5040 mlib-tgt-vms.adb, mlib-tgt-vms.ads: New files.
5041
5042 * mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-darwin.adb,
5043 mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb, mlib-tgt-lynxos.adb,
5044 mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb,
5045 mlib-tgt-vms-ia64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
5046 mlib-tgt-hpux.adb, mlib-tgt-tru64.adb: Make a common body for package
a472f546
EB
5047 MLib.Tgt, containing the default versions of the exported subprograms.
5048 For each platform, create a specific version of the body of new child
5049 package MLib.Tgt.Specific that contains only the body of subprograms
5050 that are different from the default.
5051 (Archive_Builder_Append_Options): New function.
ec11296f
AC
5052
50532007-06-06 Matthew Gingell <gingell@adacore.com>
5054
a472f546
EB
5055 * s-osinte-aix.adb: Map Ada priorities to target priorities
5056 appropriately for different scheduling policies.
ec11296f
AC
5057
50582007-06-06 Arnaud Charlet <charlet@adacore.com>
5059
5060 * s-osinte-linux.ads (sigset_t): Bump alignment to match more closely
5061 its C counterpart.
5062 Remove references to Unchecked_Conversion, and use Ada.xxx instead.
5063 Replace Unchecked_Conversion by Ada.Unchecked_Conversion.
5064
50652007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
5066
a472f546
EB
5067 * s-osprim-vms.ads, s-osprim-vms.adb (Initialize): New procedure.
5068 Noop on VMS, added for interface commonality.
ec11296f
AC
5069
50702007-06-06 Eric Botcazou <ebotcazou@adacore.com>
5071 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5072 Olivier Hainque <hainque@adacore.com>
5073
5074 * decl.c (gnat_to_gnu_entity) <object>: Manually mark the top of the
5075 renamed expression of a full renaming at toplevel.
5076 (gnat_to_gnu_entity, case object): If not defining, do not look inside
5077 the values the constant is initialized to if it is an N_Allocator.
5078 (gnat_to_gnu_entity) <E_Array_Subtype>: Manually mark the top of the
5079 TYPE_SIZE_UNIT of inner types after the stride is elaborated.
5080 (make_aligning_type): Accept an extra ROOM argument for storage to be
5081 made available before the aligned field, and an extra BASE_ALIGN
5082 argument for callers to pass the alignment guaranteed to be honored for
5083 the whole aligning object. Avoid call to finish_record_type, which only
5084 interferes with the sizes we want to set.
5085 (gnat_to_gnu_entity) <E_Variable>: Pass the required extra arguments to
5086 make_aligning_type for super-aligned objects on stack.
5087 (components_to_record): Pass the adjusted size of the type when creating
5088 fields in the qualified union for the variant part.
5089 (gnat_substitute_in_type): Copy TYPE_USER_ALIGN.
5090 (gnat_to_gnu_entity, case E_Signed_Integer_Subtype): Likewise for
5091 packed array type.
5092 (maybe_pad_type): Set TYPE_USER_ALIGN.
5093 (make_aligning_type): Likewise.
5094 ALIGN argument is unsigned int.
5095 (gnat_to_gnu_entity, case E_Function): Back annotate return mechanism.
5096 (gnat_to_gnu_param): Likewise, for parameters.
5097 (gnat_to_gnu_entity) <object>: Always instantiate the renaming object
5098 if it is constant and stems from a function call.
5099 (gnat_to_gnu_entity) <E_Record_Type>: Set packed to -2 if the alignment
5100 of the record is specified. Adjust accordingly.
5101 (adjust_packed): New static function.
5102 (gnat_to_gnu_field): Use it to adjust the packedness setting.
5103 (components_to_record): Likewise.
5104 (gnat_to_gnu_entity) <object>: Do not test the renamed expression for
5105 side-effects if the object is deemed constant.
5106 (gnat_to_gnu_entity) <E_Array_Type>: Create a name for the fat pointer
5107 type instead of merely finalizing it. Tidy.
5108 <E_Access_Subprogram_Type>: Retrieve the type from the TYPE_DECL.
5109 <E_Access_Type>: Likewise.
5110 (defer_debug_incomplete_list): Rename to defer_finalize_list.
5111 (defer_debug_level): Delete.
5112 (gnat_to_gnu_entity) <debug_deferred>: Likewise
5113 <E_Array_Type>: Call rest_of_record_type_compilation on the fat pointer
5114 type.
5115 <E_Record_Type>: Do not explicitly defer finalizing the type.
5116 Adjust for write_record_type_debug_info renaming.
5117 <E_Subprogram_Type>: Likewise.
5118 Finalize deferred types right after deferred incomplete types are
5119 expanded.
5120 (rest_of_type_decl_compilation): New global function.
5121 (components_to_record): Rename defer_debug parameter to do_not_finalize.
5122 (components_to_record): Propagate the packedness to the fields of the
5123 qualified union type if there is a variant part.
5124 (gnat_to_gnu_entity) <E_Array_Type>: Use new function
5125 instead of inline code to adjust the XUT field offsets.
5126 (gnat_to_gnu_entity): Adjust for new prototype of finish_record_type.
5127 <E_Record_Subtype>: Do not let finish_record_type compute the sizes
5128 and write the debug info if the type derives from a discriminated one.
5129 (gnat_to_gnu_entity) <E_Array_Type>: Adjust call to create_index_type.
5130 <E_Array_Subtype>: Likewise.
5131 <E_String_Literal_Subtype>: Likewise.
5132 (gnat_to_gnu_entity): Set TYPE_USER_ALIGN on types only if they have
5133 an alignment clause.
5134 (maybe_pad_type): Update ORIG_SIZE to the minimum required to meet ALIGN
5135 before giving warning.
5136 (prepend_one_attribute_to): New function, helper to prepend an attribute
5137 to an attribute list.
5138 (gnat_to_gnu_entity) <E_Procedure>: Use it.
5139 (prepend_attributes): Likewise.
5140 (gnat_to_gnu_entity) <E_Variable>: Use constants of the proper type.
5141 <E_Array_Type>: Declare the padding type for the element type, if any.
5142 <E_Array_Subtype>: Likewise.
5143 (defer_limited_with): New variable.
5144 (Gigi_Equivalent_Type): New function.
5145 (gnat_to_gnu_entity): Use it at start and use result throughout.
5146 (gnat_to_gnu_entity, case E_Access_Type): Rework to use
5147 Gigi_Equivalent_Type, support Limited_With, allow two levels of
5148 indirection, precompute if unconstrained array to simplify logic, and
5149 use defer_limited_with to defer elaboration of some types from limited
5150 with.
5151 (finalize_from_with_types): New function.
5152
51532007-06-06 Gary Dismukes <dismukes@adacore.com>
5154 Eric Botcazou <ebotcazou@adacore.com>
5155 Tristan Gingold <gingold@adacore.com>
5156 Olivier Hainque <hainque@adacore.com>
5157
a472f546
EB
5158 * trans.c (Identifier_to_gnu): Change test for deferred constant by
5159 adding guard that the entity is an E_Constant before testing presence
5160 of Full_view (and remove unnecessary test that entity is not a type).
ec11296f
AC
5161 For a CONST_DECL used by reference, manually retrieve
5162 the DECL_INITIAL. Do not invoke fold in the other DECL_P cases either.
5163 (struct language_function): Move from utils.c to here.
5164 (struct parm_attr): New structure.
5165 (parm_attr, parm_attr vector, parm_attr GC vector): New types.
5166 (f_parm_attr_cache): New macro.
5167 (Attribute_to_gnu) <Attr_Length>: When not optimizing, cache the
5168 expressions for the 'First, 'Last and 'Length attributes of the
5169 unconstrained array IN parameters.
5170 (Subprogram_Body_to_gnu): Use gnu_subprog_decl throughout.
5171 Allocate the information structure for the function earlier, as well
5172 as the language-specific part.
5173 If the parameter attributes cache has been populated, evaluate the
5174 cached expressions on entry.
5175 (takes_address): Add OPERAND_TYPE parameter. Handle N_Function_Call,
5176 N_Procedure_Call_Statement and N_Indexed_Component.
5177 (Pragma_to_gnu): Translate inspection_point to an asm statement
5178 containaing a comment and a reference to the object (either its address
5179 for BLKmode or its value).
5180 (Identifier_to_gnu): Use TREE_CONSTANT instead of CONST_DECL to decide
5181 to go to DECL_INITIAL. Together with the size constraint relaxation
5182 in create_var_decl, enlarges the set of situations in which an
5183 identifier may be used as an initializer without implying elaboration
5184 code.
5185 (Subprogram_Body_to_gnu): Do not fiddle with the debug interface but set
5186 DECL_IGNORED_P on the function if Needs_Debug_Info is not set on the
5187 node.
5188 (maybe_stabilize_reference): Remove lvalues_only parameter.
5189 (gnat_stabilize_reference): Adjust for above change.
5190 (gnat_to_gnu): Do not set location information on the result
5191 if it is a reference.
5192 (add_cleanup): Add gnat_node parameter and set the location of the
5193 cleanup to it.
5194 (Handled_Sequence_Of_Statements_to_gnu): Adjust calls to add_cleanup.
5195 (Exception_Handler_to_gnu_zcx): Likewise.
5196 (gigi): Remove the cgraph node if the elaboration procedure is empty.
5197 (Subprogram_Body_to_gnu): If a stub is attached to the subprogram, emit
5198 the former right after the latter.
5199 (start_stmt_group): Make global.
5200 (end_stmt_group): Likewise.
5201 (gnu_constraint_error_label_stack, gnu_storage_error_label_stack): New
5202 vars.
5203 (gnu_program_error_label_stack): Likewise.
5204 (gigi): Initialize them.
5205 (call_to_gnu, gnat_to_gnu, emit_check): Add new arg to build_call_raise.
5206 (gnat_to_gnu, N_{Push,Pop}_{Constraint,Storage,Program}_Error_Label):
5207 New cases.
5208 (push_exception_label_stack): New function.
5209 (takes_address): New function.
5210
5211 * utils.c (struct language_function): Move to trans.c from here.
5212 (unchecked_convert): Do not wrap up integer constants in
5213 VIEW_CONVERT_EXPRs.
5214 (create_var_decl_1): Decouple TREE_CONSTANT from CONST_DECL. Prevent
5215 the latter for aggregate types, unexpected by later passes, and relax an
5216 arbitrary size constraint on the former.
5217 (create_field_decl): Use tree_int_cst_equal instead of operand_equal_p
5218 to compare the sizes.
5219 (convert_vms_descriptor): When converting to a fat pointer type, be
5220 prepared for a S descriptor at runtime in spite of a SB specification.
5221 (shift_unc_components_for_thin_pointers): New function.
5222 (write_record_type_debug_info): For variable-sized fields, cap the
5223 alignment of the pointer to the computed alignment.
5224 (finish_record_type): Change HAS_REP parameter into REP_LEVEL.
5225 If REP_LEVEL is 2, do not compute the sizes.
5226 (build_vms_descriptor): Adjust for new prototype of finish_record_type.
5227 (build_unc_object_type): Likewise.
5228 (declare_debug_type): New function.
5229
5230 * ada-tree.def: USE_STMT: removed (not emitted anymore).
5231
5232 * misc.c (gnat_expand_expr): Call to gnat_expand_stmt removed because
5233 no statement is expandable anymore.
5234 (gnat_init_gcc_eh): Do not initialize the DWARF-2 CFI machinery twice.
5235 (gnat_handle_option): Only allow flag_eliminate_debug_types to be set
5236 when the user requested it explicitely.
5237 (gnat_post_options): By default, set flag_eliminate_unused_debug_types
5238 to 0 for Ada.
5239 (get_alias_set): Return alias set 0 for a type if
5240 TYPE_UNIVERSAL_ALIASING_P is set on its main variant.
5241
5242 * ada-tree.h: (TYPE_UNIVERSAL_ALIASING_P): New macro.
5243 (DECL_FUNCTION_STUB): New accessor macro.
5244 (SET_DECL_FUNCTION_STUB): New setter macro.
5245
5246 * lang.opt (feliminate-unused-debug-types): Intercept this flag for Ada.
5247
5248 * fe.h (Get_Local_Raise_Call_Entity, Get_RT_Exception_Entity): New
5249 declarations.
5250
52512007-06-06 Jose Ruiz <ruiz@adacore.com>
5252
5253 * s-intman-vxworks.ads, s-intman-vxworks.adb (Abort_Task_Signal):
5254 Rename to Abort_Task_Interrupt to be able to keep the same interface
5255 as the rest of the targets.
5256
5257 * s-osinte-vxworks.ads s-osinte-vxworks.adb
5258 (To_VxWorks_Priority): Remove explicit "in" mode indicator
5259
5260 * s-osinte-vxworks6.ads, s-vxwork-arm.ads, system-vxworks-arm.ads:
5261 New files.
5262
52632007-06-06 Robert Dewar <dewar@adacore.com>
5264
5265 * a-chahan.ads: Remove obsolescent pragmas
5266
5267 * a-chlat1.ads: Minor reformatting
5268
52692007-06-06 Robert Dewar <dewar@adacore.com>
5270
5271 * comperr.adb (Compiler_Abort): New Finalize/Output_Messages interface
5272 for Errout
5273
5274 * errout.adb: New Finalize/Compilation_Errors/Output_Messages
5275 implementation
5276
5277 * errout.ads (Finalize): Changed interface
5278 (Output_Messages): New procedure
5279 (Compilation_Errors): New Interface
5280
5281 * prepcomp.ads, prepcomp.adb (Parse_Preprocessing_Data_File): New
5282 Finalize/Output_Messages interface for Errout
5283 (Prepare_To_Preprocess): New Finalize/Output_Messages interface for
5284 Errout.
5285
52862007-06-06 Thomas Quinot <quinot@adacore.com>
5287 Olivier Hainque <hainque@adacore.com>
5288 Robert Dewar <dewar@adacore.com>
5289
5290 * a-except.ads, a-except.adb: (Rmsg_28): Fix description for E.4(18)
5291 check.
5292 (Raise_Current_Excep): Call Debug_Raise_Exception just before
5293 propagation starts, to let debuggers know about the event in a reliable
5294 fashion.
5295 (Local_Raise): Moved to System.Exceptions
5296 More convenient to have this as a separate unit
5297
5298 * s-except.adb, s-except.ads: New files.
5299
5300 * a-exextr.adb (Unhandled_Exception): Delete - replaced by
5301 Debug_Unhandled_Exception in System.Exceptions where it belongs
5302 together with a couple of other debug helpers.
5303 (Notify_Unhandled_Exception): Use Debug_Unhandled_Exception instead of
5304 the former Unhandled_Exception.
5305
5306 * exp_ch11.ads, exp_ch11.adb: (Possible_Local_Raise): New procedure
5307 (Warn_No_Exception_Propagation): New procedure
5308 (Warn_If_No_Propagation): Rewritten for new warning generation
5309 (Expand_Exception_Handlers): New warning generation
5310 (Expand_N_Raise_xxx_Error): Rewritten for new warnings
5311 (Add_Exception_Label): Use Special_Exception_Package_Used for test
5312 instead of Most_Recent_Exception_Used (accomodates Exception_Traces)
5313 (Expand_Local_Exception_Handlers): Unconditionally add extra block wrap
5314 even if restriction is set (makes life easier in Check_Returns)
5315 (Expand_Local_Exception_Handlers): Follow renamed entity chain when
5316 checking exception identities.
5317 (Expand_Local_Exception_Handlers): Do not optimize when all others case
5318 (Expand_Local_Exception_Handlers): Set Exception_Junk flag on generated
5319 block for handler (used by Check_Returns)
5320 (Expand_Local_Exception_Handlers): Local_Raise now takes an address
5321 (Expand_N_Handled_Sequence_Of_Statements): Properly handle -gnatd.x to
5322 remove all exception handlers when optimizing local raise statements.
5323 (Find_Local_Handler): Use Get_Renamed_Entity
5324 (Expand_N_Handled_Sequence_Of_Statements): If the handled sequence is
5325 marked analyzed after expanding exception handlers, do not generate
5326 redundant cleanup actions, because they have been constructed already.
5327
53282007-06-06 Thomas Quinot <quinot@adacore.com>
5329
5330 * a-finali.ads (Ada.Finalization): Add missing pragma Remote_Types. The
5331 presence of this categorization pragma is mandated by the language.
5332 (Limited_Controlled): Add missing pragma Preelaborable_Initialization
5333 for this type.
5334
53352007-06-06 Vincent Celier <celier@adacore.com>
5336 Robert Dewar <dewar@adacore.com>
5337
5338 * bcheck.adb, binde.adb, binderr.adb, binderr.ads, butil.adb,
5339 butil.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads,
5340 err_vars.ads, exp_tss.adb, exp_tss.ads, fmap.adb, fmap.ads,
5341 fname.adb, fname.ads, fname-sf.adb, fname-uf.adb, fname-uf.ads,
5342 lib-sort.adb, lib-util.adb, lib-util.ads, lib-xref.adb, makeutl.ads,
5343 makeutl.adb, nmake.adt, osint.adb, osint.ads, osint-b.adb,
5344 par-load.adb, prj-attr.adb, prj-dect.adb, prj-err.adb, prj-makr.adb,
5345 prj-part.adb, prj-pp.adb, prj-proc.adb, prj-tree.adb, prj-tree.ads,
5346 prj-util.adb, prj-util.ads, scans.adb, scans.ads, sem_ch2.adb,
5347 sinput-c.adb, styleg-c.adb, tempdir.adb, tempdir.ads, uname.adb,
5348 uname.ads, atree.h, atree.ads, atree.adb, ali-util.ads, ali-util.adb,
5349 ali.ads, ali.adb:
5350 Move Name_Id, File_Name_Type and Unit_Name_Type from package Types to
5351 package Namet. Make File_Name_Type and Unit_Name_Type types derived from
5352 Mame_Id. Add new type Path_Name_Type, also derived from Name_Id.
5353 Use variables of types File_Name_Type and Unit_Name_Type in error
5354 messages.
5355 (Get_Name): Add parameter Ignore_Special, and set it reading file name
5356 (New_Copy): When debugging the compiler, call New_Node_Debugging_Output
5357 here.
5358 Define flags Flag217-Flag230 with associated subprograms
5359 (Flag_Word5): New record type.
5360 (Flag_Word5_Ptr): New access type.
5361 (To_Flag_Word5): New unchecked conversion.
5362 (To_Flag_Word5_Ptr): Likewise.
5363 (Flag216): New function.
5364 (Set_Flag216): New procedure.
5365
53662007-06-06 Arnaud Charlet <charlet@adacore.com>
5367
5368 * a-stzunb.adb, a-stwiun.adb, a-strunb.adb: (Insert): Use 'Length
5369 instead of 'Size.
5370
5371 * a-stwifi.ads, a-stzfix.ads: Minor reformatting
5372
53732007-06-06 Javier Miranda <miranda@adacore.com>
5374
5375 * a-tags.ads, a-tags.adb (Tag_Size): This constant is now internal to
5376 the package.
5377 (Object_Specific_Data_Array): This is now internal to the package.
5378 (Object_Specific_Data): This is now internal to the package.
5379 (Select_Specific_Data_Element): This is now internal to the package.
5380 (Select_Specific_Data_Array): This is now internal to the package.
5381 (Select_Specific_Data): This is now internal to the package.
5382 (Offset_To_Top_Function_Ptr): This is now public.
5383 (To_Offset_To_Top_Function_Ptr): Removed.
5384 (Storage_Offset_Ptr,To_Storage_Offset_Ptr): These declarations are now
5385 local to subprogram Offset_To_Top.
5386 (Predefined_DT): Removed.
5387 (Typeinfo_Ptr): Removed.
5388 (OSD): This function is now internal to this package.
5389 (SSD): This function is now internal to this package.
5390 (DT): New function that displaces the pointer to the table of primitives
5391 to get access to the enclosing wrapper record.
5392 (IW_Membership): Code cleanup.
5393 (Offset_To_Top): Code cleanup.
5394 (Predefined_DT): Removed.
5395 (Register_Interface_Tag): Removed.
5396 (Set_Interface_Table): Removed.
5397 (Set_Offset_Index): Removed.
5398 (Set_Offset_To_Top): Code cleanup.
5399 (Set_OSD): Removed.
5400 (Set_Signature): Removed.
5401 (Set_SSD): Removed.
5402 (Set_Tagged_Kind): Removed.
5403 (Typeinfo_Ptr): Removed.
5404 (TSD): Removed.
5405 (Displace): Add missing check on null actual.
5406
5407 * exp_disp.ads, exp_disp.adb
5408 (Select_Expansion_Utilities): Removed.
5409 (Build_Common_Dispatching_Select_Statements): Moved to exp_atags.
5410 (Expand_Dispatching_Call): Update calls to Get_Prim_Op_Address because
5411 the interface requires a new parameter.
5412 (Make_Disp_Asynchronous_Select_Spec, Make_Disp_Conditional_Select_Spec,
5413 Make_Disp_Get_Prim_Op_Kind_Spec, Make_Disp_Timed_Select_Spec): Replace
5414 calls to subprograms Build_T, Build_S, etc. by the corresponding code.
5415 Done to remove package Select_Expansion_Utilities.
5416 (Make_DT): New implementation for statically allocated dispatch tables.
5417 (Make_Secondary_DT): Moved to the scope of Make_DT.
5418 (Register_Primitive): Code cleanup plus incoporate the use of the new
5419 function DT_Address_Attribute.
5420 (Expand_Interface_Thunk): The profile of this subprogram has been
5421 changed to return the Thunk_Id and the corresponding code.
5422 (Fill_DT_Entry): Removed. Its functionality is now provided by
5423 subprogram Register_Primitive.
5424 (Fill_Secondary_DT_Entry): Removed. Its functionality is now provided by
5425 subprogram Register_Primitive.
5426 (Register_Primitive): New subprogram that incorporates the previous
5427 functionalities of Fill_DT_Entry and Fill_Secondary_DT_Entry.
5428 (Build_Common_Dispatching_Select_Statements): Remove formal Typ. This
5429 was only required to call Make_DT_Access_Action, which is now removed.
5430 (Ada_Actions): Removed
5431 (Action_Is_Proc): Removed
5432 (Action_Nb_Arg): Removed
5433 Replace all the calls to Make_DT_Access_Action by direct calls to
5434 Make_Procedure_Call_Statement or Make_Function_Call.
5435 (Set_DTC_Entity_Value): New subprogram.
5436 (Set_All_DT_Position): Add call to new subprogram Set_DTC_Entity_Value.
5437 (Expand_Interface_Thunk): Add missing support for primitives that are
5438 functions with a controlling result (case in which there is no need
5439 to generate the thunk).
5440
5441 * exp_atag.ads, exp_atag.adb
5442 (Build_DT): New subprogram that displaces the pointer to reference the
5443 base of the wrapper record.
5444 (Build_Typeinfo_Offset): Removed.
5445 (RTE_Tag_Node): Removed.
5446 (Build_Common_Dispatching_Select_Statements): Moved here from exp_disp
5447 (Build_Get_RC_Offset): Removed.
5448 (Build_Inherit_Predefined_Prims): Removed.
5449 (Build_Inherit_TSD: Removed.
5450 (Build_New_TSD): Removed.
5451 (Build_Set_External_Tag): Removed.
5452 (Build_Set_Predefined_Prim_Op_Address): Add documentation.
5453 (Build_Set_Prim_Op_Address): Add documentation.
5454 (Build_Set_TSD): Removed.
5455
5456 * rtsfind.ads, rtsfind.adb
5457 (Load_Fail): If load fails and we are not in configurable run-time
5458 mode, then raise Unrecoverable_Error.
5459 (Text_IO_Kludge): Generate an error message if a run-time library is
5460 not available in a given run-time (ie. zfp run-time).
5461 (RTE_Record_Component): Add code to check that the component we search
5462 for is not found in two records in the given run-time package.
5463 (RE_DT_Offset_To_Top_Size, RE_DT_Predef_Prims_Size): Removed
5464 (RE_DT_Predef_Prims_Offset): New entity
5465 (RE_Static_Offset_To_Top): New entity
5466 (RE_HT_Link): New entity.
5467 (System_Address_Image): Addition of this run-time package.
5468 (RE_Address_Image): New entity.
5469 (RE_Abstract_Interface): Removed.
5470 (RE_Default_Prim_Op_Count): Removed.
5471 (RE_DT_Entry_Size): Removed.
5472 (RE_DT_Min_Prologue_Size): Removed.
5473 (RE_DT_Prologue_Size): Removed.
5474 (RE_Ifaces_Table_Ptr): Removed.
5475 (RE_Interface_Data_Ptr): Removed.
5476 (RE_Type_Specific_Data): Removed.
5477 (RE_Primary_DT): Removed.
5478 (RE_Register_Interface_Tag): Removed.
5479 (RE_Set_Offset_Index): Removed.
5480 (RE_Set_OSD): Removed.
5481 (RE_Set_SSD): Removed.
5482 (RE_Set_Signature): Removed.
5483 (RE_Set_Tagged_Kind): Removed.
5484 (RE_Address_Array): New entity.
5485 (RE_DT): New entity.
5486 (RE_Iface_Tag): New entity.
5487 (RE_Interfaces_Table): New entity.
5488 (RE_No_Dispatch_Table): New entity.
5489 (RE_NDT_Prims_Ptr): New entity.
5490 (RE_NDT_TSD): New entity.
5491 (RE_Num_Prims): New entity.
5492 (RE_Offset_To_Top_Function_Ptr): New entity.
5493 (RE_OSD_Table): New entity.
5494 (RE_OSD_Num_Prims): New entity.
5495 (RE_Predef_Prims): New entity
5496 (RE_Predef_Prims_Table_Ptr): New entity.
5497 (RE_Primary_DT): New entity.
5498 (RE_Signature): New entity.
5499 (RE_SSD): New entity.
5500 (RE_TSD): New entity.
5501 (RE_Type_Specific_Data): New entity.
5502 (RE_Tag_Kind): New entity.
5503
55042007-06-06 Thomas Quinot <quinot@adacore.com>
5505
5506 * a-textio.ads, a-textio.adb (Write): Add explicit size clause for the
5507 C imported variable.
5508 (Skip_Line): Do not reset Before_LM_PM immediately when Before_LM is set
5509 on entry.
5510
55112007-06-06 Robert Dewar <dewar@adacore.com>
5512
5513 * a-tienio.adb (Get): Adjust buffer size to accomodate one extra
5514 character
5515
55162007-06-06 Vincent Celier <celier@adacore.com>
5517
5518 * a-tifiio.adb (Put, internal): For negative numbers, check that there
5519 is room for at least one digit and the minus sign.
5520 (Put.Put_Character): Never put a character outside of the range of
5521 string To.
5522
55232007-06-06 Olivier Hainque <hainque@adacore.com>
5524 Eric Botcazou <ebotcazou@adacore.com>
5525
5526 * utils2.c (build_allocator): Provide the extra arguments to
5527 make_aligning_type for super-aligned objects allocated from the default
5528 pool. Leave enough room for a pointer before the aligning field, and
5529 store the system's allocator return value there.
5530 (build_call_alloc_dealloc): When releasing a super-aligned object,
5531 retrieve the system's allocator return value from where build_allocator
5532 has stored it, just ahead of the adjusted address we are passed.
5533 (build_call_raise): Handle properly the generation of line numbers when
5534 the node is marked No_Location.
5535 (compare_elmt_bitpos): Use tree_int_cst_compare. Stabilize the sort
5536 by using DECL_UID on ties.
5537 (build_binary_op) <EQ_EXPR>: Accept fat pointer types with the same
5538 main variant.
5539 (build_call_raise): Handle converting exception into goto; support new
5540 argument KIND.
5541 (build_component_ref): Add new arg to build_call_raise.
5542
55432007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
5544
5545 * a-ztflau.adb, a-wtflau.adb, a-tiflau.adb (Load_Real): Do not parse
5546 "." in the case of nnn.xxx when nnn terminates with an underscore.
5547 Parse the remaining "#" or ":" in the case of nnn#.xxx#
5548
55492007-06-06 Robert Dewar <dewar@adacore.com>
5550
5551 * a-tigeau.ads, a-tigeau.adb: (Store_Char): Change Buf to IN OUT
5552
55532007-06-06 Arnaud Charlet <charlet@adacore.com>
5554 Vincent Celier <celier@adacore.com>
5555 Robert Dewar <dewar@adacore.com>
5556
5557 * bindgen.adb (Gen_Output_File_Ada): Generate pragma No_Run_Time when
5558 needed.
5559 (Gen_Output_File_Ada, Gen_Output_File_C): Never use __attribute
5560 ((destructor)) for adafinal, even when switch -a is used.
5561 Do not issue pragma Linker_Destructor for adafinal when switch -a is
5562 used.
5563 (Gen_Object_Files_Options): Add formatting of Linker Options, when
5564 Output_Linker_Option_List is set. Suppress this formatting when
5565 Zero_Formatting is set.
5566 Add case for CLI_Target.
5567 (System_Restrictions_Used): New flag, used to avoid generating with of
5568 System_Restrictions and initialization of the data unless there is
5569 some use of System.Restrictions in the partition.
5570 (Check_System_Restrictions_Used): New procedure
5571
5572 * s-stalib.adb: Remove with of System.Restrictions. No longer needed
5573 since we only with this unit in the binder file if it is used elsewhere
5574 in the partition.
5575
55762007-06-06 Vincent Celier <celier@adacore.com>
5577
5578 * bindusg.adb: Add line for @<response file>
5579 Add lines for new switches -R and -Z
5580
5581 * gnatbind.adb (Gnatbind): Do not include sources from the GNAT
5582 hierarchy in the list of files of the closure when -R is used
5583 (Gnatbind): Accept arguments starting with '@' to indicate response
5584 files and take the arguments from the response files.
5585 If List_Closure is set, display the referenced files
5586
55872007-06-06 Javier Miranda <miranda@adacore.com>
5588 Robert Dewar <dewar@adacore.com>
5589 Ed Schonberg <schonberg@adacore.com>
5590
5591 * checks.ads, checks.adb (Apply_Address_Clause_Check): Handle case in
5592 which the address-clause is applied to in-mode actuals (allowed by
5593 13.1(22)).
5594 (Apply_Discriminant_Check): Do not generate a check if the type is
5595 constrained by a current instance.
5596 (Activate_Division_Check): New procedure
5597 (Activate_Overflow_Check): New procedure
5598 (Activate_Range_Check): New procedure
5599 Call these new Activate procedures instead of setting flags directly
5600 (Apply_Array_Size_Check): Removed, no longer needed.
5601 Code clean up: remove obsolete code related to GCC 2.
5602 (Get_E_Length): Protect against bomb in case scope is standard
5603 (Selected_Range_Checks): If the node to be checked is a conversion to
5604 an unconstrained array type, and the expression is a slice, use the
5605 bounds of the slice to construct the required constraint checks.
5606 Improve NOT NULL error messages
5607 (Apply_Constraint_Check): If the context is a null-excluding access
5608 type, diagnose properly the literal null.
5609
56102007-06-06 Pascal Obry <obry@adacore.com>
5611
5612 * clean.adb (Clean_Archive): Use untouched casing for the archive name
5613 and the corresponding .deps file.
5614 (Clean_Interface_Copy_Directory): Use untouched casing for the library
5615 src directory. Minor code-clean-up. Use untouched casing for files
5616 read into the library src dir.
5617 (Clean_Library_Directory): Idem.
5618 (Parse_Cmd_Line): Accept new switch -aP
5619
56202007-06-06 Javier Miranda <miranda@adacore.com>
5621 Ed Schonberg <schonberg@adacore.com>
5622 Robert Dewar <dewar@adacore.com>
5623 Eric Botcazou <ebotcazou@adacore.com>
5624 Arnaud Charlet <charlet@adacore.com>
5625
5626 * einfo.ads, einfo.adb (Available_View): New synthesized attribute
5627 applicable to types that have the With_Type flag set. Returns the
5628 non-limited view of the type, if available, otherwise the type itself.
5629 For class-wide types, there is no direct link in the tree, so we have
5630 to retrieve the class-wide type of the non-limited view of the Etype.
5631 New attributes Static_Initialization and Static_Elaboration_Desired.
5632 Remove the pragma Thread_Body, and the associated flag
5633 Is_Thread_Body in entities, and all related code.
5634 (Suppress_Value_Tracking_On_Call): New flag
5635 E_Exception has Esize and Alignment fields
5636 (Universal_Aliasing): New function.
5637 (Set_Universal_Aliasing): New procedure.
5638 (Write_Entity_Flags): Deal with Universal_Aliasing flag.
5639 (Check_Nested_Access): New procedure.
5640 (Has_Up_Level_Access, Set_Has_Up_Level_Access): New procedures.
5641 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
5642 (Related_Interface): New attribute. Present in dispatch table pointer
5643 components of records. Set to point to the entity of the corresponding
5644 interface type.
5645 (Is_By_Reference_Type): Recurse on the full view of an incomplete type.
5646 (Original_Access_Type): Remove, not needed.
5647 (Root_Type): Handle properly subtypes of class-wide-types.
5648 Update comments.
5649
5650 * sem_ch4.adb (Analyze_Explicit_Dereference): Add support for
5651 class-wide types visible through limited-with clauses.
5652 (Try_Primitive_Operation): When examining all primitive operations of a
5653 tagged type, do not consider subprograms labeled as hidden unless they
5654 belong to a private generic type with a tagged parent.
5655 (Try_Object_Operation): Extensive rewriting, to handle properly various
5656 overloading cases, when several ancestors may have class-wide operations
5657 that are possible candidates, and when the overloaded functions return
5658 array types and have defaulted parameters so that the call may be
5659 interpreted as an indexing.
5660 (Analyze_Allocator): Remove Mark_Allocator and its invocation.
5661 (Process_Function_Call): use Next, rather than Next_Actual, to analyze
5662 successive actuals before analyzing the call itself.
5663 (Try_Primitive_Operation): A primitive operation is compatible with the
5664 prefix if the prefix has a synchronized type and the type of the formal
5665 is its corresponding record, as can be the case when the primitive
5666 operation is declared outside of the body of the type.
5667 (Traverse_Homonyms): New subprocedure of Try_Class_Wide_Operation, to
5668 perform homonym traversal, looking for class-wide operation matches
5669 (formerly done in statements of Try_Class_Wide_Operation). Matches on
5670 access parameters are now restricted to anonymous access types.
5671 (Mark_Allocator): An allocator with a discriminant association parent is
5672 a coextension.
5673 (Try_One_Prefix_Interpretation): If the type of the object is
5674 incomplete, as can be happen when it is a limited view obtained through
5675 a limited_with_clause, the selected component is not part of a prefixed
5676 call.
5677 (Complete_Object_Operation): Diagnose properly an object that is not
5678 aliased when the corresponding controlling formal is an access
5679 parameter.
5680 (Try_Primitive_Operation, Try_Class_Wide_Operation): Diagnose properly
5681 ambiguous calls in prefixed notation, where two primitives differ only
5682 in that the controlling argument of one is an access parameter.
5683
5684 * sem_ch6.adb (Has_Single_Return): Add guard in code that determines
5685 whether a function that returns an unconstrained type can be inlined.
5686 (Process_Formals): Diagnose properly the illegal use of an incomplete
5687 type in the profile of an access_to_subprogram declaration.
5688 (Check_Synchronized_Overriding): Nothing check for concurrent types, the
5689 operations are attached to the corresponding record.
5690 (Analyze_Subprogram_Specification): Add variables Formal and Formal_Typ.
5691 When processing a primitive of a concurrent type which implements an
5692 interface change the type of all controlling formals to that of the
5693 corresponding record type.
5694 (Check_Synchronized_Overriding): Relax the conditional logic when trying
5695 to determine the tagged type to which a primitive belongs.
5696 (Check_Conventions): Capture condition to ignore a primitive operation
5697 (which is shared between the loop in Check_Conventions and the one in
5698 Check_Convention) in a new local function Skip_Check.
5699 (Check_Convention): Rename Prim_Op to Second_Prim_Op to avoid possible
5700 confusion with Check_Conventions' own Prim_Op local variable.
5701 (Create_Extra_Formals): Test for a tagged result type rather than a
5702 controlling result when determining whether to add a BIP_Alloc_Form
5703 formal and a BIP_Final_List formal to the function.
5704 (Check_Conformance); For parameters that are anonymous access types,
5705 subtype conformance requires that the not null and the constant
5706 indicators must match
5707 (Check_Synchronized_Overriding): New parameter Formal_Typ. Add machinery
5708 to retrieve the appropriate type when processing a concurrent type
5709 declared within a generic. Minor comment reformatting. Change invocation
5710 of Overrides_Synchronized_Primitive to Find_Overridden_Synchronized_Pri-
5711 mitive.
5712 (Analyze_Subprogram_Body): If the return type of a function is an
5713 anonymous access to the limited view of a class-wide type, and the
5714 non-limited view of the type is available, update the type of the
5715 function so that code can be generated.
5716 (Process_Formals): In case of access-subtype itype whose designated
5717 type is also an itype (situation that happens now with access to
5718 subprograms) we mark the access-type itype with the Has_Delayed_Freeze
5719 attribute to avoid backend problems.
5720 (Check_Return_Subtype_Indication): Replace R_Type with R_Stm_Type in
5721 init of R_Stm_Type_Is_Anon_Access. Also check that base types of the
5722 anonymous types' designated types are same before testing
5723 Subtypes_Statically_Match.
5724 (Create_Extra_Formals): Test for a named access parameter that is a
5725 controlling formal as an additional condition for adding an
5726 accessibility level formal. This can occur in the subp type created for
5727 dispatching calls in Expand_Dispatching_Call, and allows calling
5728 Create_Extra_Formals from that procedure rather than special-casing the
5729 extra formals there.
5730 (Create_Extra_Formals): Add BIP_Alloc_Form and BIP_Final_List formals
5731 when the function has a controlling result.
5732 (Check_Returns): Add much more knowledge of the optimization of local
5733 raise statements to gotos, to retain proper warnings in this case.
5734 (Check_Statement_Sequence): Ignore N_Push_xxx_Label and N_Pop_xxx_Label
5735 nodes when looking for last statement.
5736
5737 * sem_type.ads, sem_type.adb (Specific_Type): Add support for
5738 class-wide types visible through limited with clauses.
5739 (Add_One_Interp): If the operands are anonymous access types, the
5740 predefined operator on universal_access is immediately visibles
5741 (Find_Unique_Type): Handle anonymous access to subprogram types just as
5742 other anonymous access types.
5743 (Disambiguate): Take into account CIL convention.
5744 (Interface_Present_In_Ancestor): Add support for class-wide interfaces.
5745
57462007-06-06 Robert Dewar <dewar@adacore.com>
5747
5748 * sinput.ads, sinput.adb, uintp.ads, urealp.adb, stringt.adb,
5749 sem_elim.adb, prj-strt.adb, repinfo.ads, repinfo.adb, namet.ads,
5750 elists.ads, elists.adb, lib.ads, lib.adb (Unlock): New procedure.
5751 Fix lower bound of tables.
5752 Add rep clauses.
5753
5754 * nlists.adb: Ditto.
5755 (Prev_Node, Next_Node): Change index type to Int so that it properly
5756 covers the range First_Node_Id - 1 up.
5757
57582007-06-06 Javier Miranda <miranda@adacore.com>
5759 Ed Schonberg <schonberg@adacore.com>
5760 Bob Duff <duff@adacore.com>
5761 Hristian Kirtchev <kirtchev@adacore.com>
5762
5763 * exp_aggr.ads, exp_aggr.adb:
5764 (Build_Record_Aggr_Code): Add missing initialization of secondary tags
5765 in extension aggregates.
5766 (Flatten): Other conditions being met, an aggregate is static if the
5767 low bound given by component associations is different from the low
5768 bound of the base index type.
5769 (Packed_Array_Aggregate_Handled): If the component type is itself a
5770 packed array or record, the front-end must expand into assignments.
5771 (Gen_Ctrl_Actions_For_Aggr): In call to Init_Controller, pass False to
5772 Init_Pr, instead of Ancestor_Is_Expression.
5773 (Gen_Ctrl_Actions_For_Aggr): When processing an aggregate of a
5774 coextension chain root, either generate a list controller or use the
5775 already existing one.
5776 (Static_Array_Aggregate): New procedure to construct a positional
5777 aggregate that can be handled by the backend, when all bounds and
5778 components are compile-time known constants.
5779 (Expand_Record_Aggregate): Force conversion of aggregates of tagged
5780 types covering interface types into assignments.
5781 (Replace_Type): move to Build_Record_Aggr_Code.
5782 (Expand_Record_Aggr_Code): if the target of the aggregate is an
5783 interface type, convert to the definite type of the aggregate itself,
5784 so that needed components are visible.
5785 (Convert_Aggr_In_Object_Decl): If the aggregate has controlled
5786 components and the context is an extended return statement do not
5787 create a transient block for it, to prevent premature finalization
5788 before the return is executed.
5789 (Gen_Assign): Do not generate a call to deep adjust routine if the
5790 component type is itself an array of controlled (sub)-components
5791 initialized with an inner aggregate.
5792 (Component_Check): New name for Static_Check. This name is now more
5793 appropriate, and documentation is added which was missing.
5794 (Component_Check): Add test for bit aligned component value
5795 (Component_Not_OK_For_Backend): Renames Has_Delayed_Nested_Aggregate_Or_
5796 Tagged_Comps, name is more appropriate given added function below.
5797 (Component_Not_OK_For_Backend): Check for bit aligned component ref.
5798
57992007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
5800 Javier Miranda <miranda@adacore.com>
5801 Robert Dewar <dewar@adacore.com>
5802
5803 * exp_attr.adb (Expand_N_Attribute_Reference): Case Callable and
5804 Terminated: Add unchecked type conversion from System.Address to
5805 System.Tasking.Task_Id when calling the predefined primitive
5806 _disp_get_task_id.
5807 Disable new Ada 05 accessibility check for JVM.NET targets, which
5808 cannot be implemented in a practical way.
5809 (Expand_N_Attribute_Reference: case Attribute_Tag): The use of 'Tag in
5810 the sources always references the tag of the actual object. Therefore,
5811 if 'Tag is applied in the sources to class-wide interface objects we
5812 generate code that displaces "this" to reference the base of the object.
5813 (Expand_N_Attribute_Reference, case Size): Return specified size if
5814 known to front end.
5815 (Expand_N_Attribute_Reference): The expansion of the 'Address attribute
5816 has code that displaces the pointer of the object to manage interface
5817 types. However this code must not be executed when the prefix is a
5818 subprogram. This bug caused the wrong expansion of the internally
5819 generated assignment that fills the dispatch table when the primitive
5820 is a function returning a class-wide interface type.
5821 (Expand_N_Attribute_Reference:Attribute_Valid): Remove incorrect call to
5822 Set_Attribute_Name for Name_Unaligned_Valid.
5823
58242007-06-06 Ed Schonberg <schonberg@adacore.com>
5825 Gary Dismukes <dismukes@adacore.com>
5826
5827 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address):
5828 If the initialization is the equivalent aggregate of the initialization
5829 procedure of the type, do not remove it.
5830 (Expand_N_Attribute_Definition_Clause): Exclude access variables
5831 initialized to null from having their expression reset to empty and
5832 note this exception in the comment.
5833
58342007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
5835 Robert Dewar <dewar@adacore.com>
5836 Ed Schonberg <schonberg@adacore.com>
5837 Gary Dismukes <dismukes@adacore.com>
5838
5839 * exp_ch2.adb: Remove "with" and "use" clauses for Namet and Snames.
5840 Add "with" and "use" clauses for Sem_Attr.
5841 (Expand_Current_Value): Do not replace occurences of attribute
5842 references where the prefix must be a simple name.
5843
5844 * sem_attr.ads, sem_attr.adb: Remove "with" and "use" clauses for
5845 Namet. Add new arrays Attribute_Name_Modifies_Prefix and
5846 Attribute_Requires_Simple_Name_Prefix.
5847 (Name_Modifies_Prefix): Body of new function.
5848 (Requires_Simple_Name_Prefix): Body of new function.
5849 (Resolve_Attribute, case Access): Improve error message for case of
5850 mismatched conventions.
5851 (Analyze_Attribute, case 'Tag): The prefix the attribute cannot be of an
5852 incomplete type.
5853 (Analyze_Attribute, case 'Access): If the type of the prefix is a
5854 constrained subtype for a nominal unconstrained type, use its base type
5855 to check for conformance with the context.
5856 (Resolve_Attribute): Remove test of the access type being associated
5857 with a return statement from condition for performing accessibility
5858 checks on access attributes, since this case is now captured by
5859 Is_Local_Anonymous_Access.
5860 (Analyze_Access_Attribute): Set Address_Taken on entity
5861 (Analyze_Attribute, case Address): Set Address_Taken on entity
5862 (OK_Self_Reference): Traverse tree to locate enclosing aggregate when
5863 validating an access attribute whose prefix is a current instance.
5864 (Resolve_Attribute): In case of attributes 'Code_Address and 'Address
5865 applied to dispatching operations, if freezing is required then we set
5866 the attribute Has_Delayed_Freeze in the prefix's entity.
5867 (Check_Local_Access): Set flag Suppress_Value_Tracking_On_Call in
5868 current scope if access of local subprogram taken
5869 (Analyze_Access_Attribute): Check legality of self-reference even if the
5870 expression comes from source, as when a single component association in
5871 an aggregate has a box association.
5872 (Resolve_Attribute, case 'Access): Do not apply accessibility checks to
5873 the prefix if it is a protected operation and the attribute is
5874 Unrestricted_Access.
5875 (Resolve_Attribute, case 'Access): Set the Etype of the attribute
5876 reference to the base type of the context, to force a constraint check
5877 when the context is an access subtype with an explicit constraint.
5878 (Analyze_Attribute, case 'Class): If the prefix is an interface and the
5879 node is rewritten as an interface conversion. leave unanalyzed after
5880 resolution, to ensure that type checking against the context will take
5881 place.
5882
58832007-06-06 Ed Schonberg <schonberg@adacore.com>
5884 Javier Miranda <miranda@adacore.com>
5885 Robert Dewar <dewar@adacore.com>
5886
5887 * exp_ch3.adb (Make_Controlling_Function_Wrappers): generate wrapper a
5888 wrapper when the full view of the controlling type of an inherited
5889 function that dispatches on result implements interfaces.
5890 (Expand_N_Object_Declaration): In cases where the type of the
5891 declaration is anonymous access, create finalization list for it.
5892 (Expand_N_Object_Declaration): Generate a persistent_bss directive only
5893 if the object has no explicit initialization, to match description of
5894 functionality of pragam Persistent_BSS.
5895 (Build_Equivalent_Array_Aggregate, Build_Equivalent_Record_Aggregate):
5896 new function to build static aggregates, to replace initialization call
5897 when static initialization is desired.
5898 (Freeze_Type): Generate a list controller for an access type whenever
5899 its designated type has controlled anonymous access discriminants.
5900 (Build_Equivalent_Aggregate): New procedure to compute a static
5901 aggregate to be used as default initialization for composite types,
5902 instead of a generating a call to the initialization procedure for the
5903 type.
5904 (Build_Initialization_Call): When available, replace a call to the
5905 initialization procedure with a copy of the equivalent static aggregate
5906 for the type.
5907 (Expand_N_Object_Declaration): Use New_Occurrence_Of in generated
5908 declarations for objects of a class-wide interface type, rather than
5909 just identifiers, to prevent visibility problems.
5910 (Expand_N_Object_Declaration): When expanding the declaration for an
5911 object of a class-wide interface type, preserve the homonym chain of
5912 the original entity before exchanging it with that of the generated
5913 renaming declaration.
5914 (Freeze_Enumeration_Type): Don't raise CE if No_Exception_Propagation
5915 active, because there is no way to handle the exception.
5916 (Freeze_Record_Type): In case of CPP_Class types add a call to Make_DT
5917 to do a minimum decoration of the Access_Disp_Table list.
5918 (Expand_Record_Controller): Avoid the addition of the controller between
5919 the component containing the tag of a secondary dispatch table and its
5920 adjacent component that stores the offset to the base of the object.
5921 This latter component is only generated when the parent type has
5922 discriminants ---documented in Add_Interface_Tag_Components).
5923 (Apply_Array_Size_Check): Removed, no longer needed.
5924 (Expand_N_Full_Type_Declaration): If the type has anonymous access
5925 components, create a Master_Entity for it only if it contains tasks.
5926 (Build_Init_Procedure): Suppress the tag assignment compiling under
5927 no run-time mode.
5928 (Freeze_Record_Type): Remove code associated with creation of dispatch
5929 table.
5930 (Init_Secondary_Tags): Update type of actuals when generating calls to
5931 Ada.Tags.Set_Offset_To_Top
5932 (Stream_Operation_OK): Disable use of streams compiling under no
5933 run-time mode
5934 (Expand_N_Object_Declaration): Don't do Initialize_Scalars initalization
5935 if Has_Init_Expression set.
5936 (Build_Init_Procedure): Replace call to Fill_DT_Entry by call to
5937 Register_Primitive, which provides the same functionality.
5938 (Requires_Init_Proc): Return false in case of interface types.
5939 (Add_Secondary_Tables): Use the new attribute Related_Interface to
5940 cleanup the code.
5941 (Predefined_Primitive_Freeze): Do not assume that an internal entity
5942 is always associated with a predefined primitive because the internal
5943 entities associated with interface types are not predefined primitives.
5944 Therefore, the call to Is_Internal is replaced by a call to the
5945 function Is_Predefined_Dispatching_Operation.
5946 (Make_Eq_If): When generating the list of comparisons for the
5947 components of a given variant, omit the controller component that is
5948 present if the variant has controlled components.
5949
59502007-06-06 Javier Miranda <miranda@adacore.com>
5951 Hristian Kirtchev <kirtchev@adacore.com>
5952 Bob Duff <duff@adacore.com>
5953
5954 * exp_ch4.adb (Complete_Coextension_Finalization): Add machinery to
5955 handle the creation of finalization lists and calls for nested
5956 coextensions when the root of the chains is part of a return statement.
5957 (Inside_A_Return_Statement): New function inside Complete_Coextension_
5958 Finalization.
5959 (Expand_Record_Equality): Skip components that are interface types.
5960 (Displace_Allocator_Pointer): Add missing support for interface subtypes
5961 (Expand_N_Allocator): Replace invocation of Is_Local_Access_Discriminant
5962 with Rewrite_Coextension. Change the condition for detecting coextension
5963 root nodes.
5964 (Is_Local_Access_Discriminant): Removed.
5965 (Rewrite_Coextension): New routine which rewrites a static coextension
5966 as a temporary and uses its unrestricted access in the construction of
5967 the outer object.
5968 (Complete_Coextension_Finalization): New routine. Generate finalization
5969 attachment calls to all delayed coextensions.
5970 (Expand_N_Allocator): Call Complete_Coextension_Finalization whenever
5971 the allocator is not a coextension itself and has delayed coextensions.
5972 If the current allocator is controlled, but also a coextension, delay
5973 the generation of the finalization attachment call.
5974 Rename local variable "Node" to "Nod" in order to avoid confusion with
5975 "Elists.Node".
5976 (Expand_Allocator_Expression): Call Adjust for initialized allocators of
5977 limited types that are not inherently limited. Such an allocator is
5978 illegal, but is generated by the expander for a return statement, to
5979 copy the result onto the secondary stack. This is the only case where a
5980 limited object can be copied. Generate code to displace the pointer
5981 to the object if the qualified expression is a class-wide interface
5982 object. Such displacement was missing and hence the copy of the object
5983 was wrong.
5984 (Apply_Accessibility_Check): Handle allocated objects initialized in
5985 place.
5986 (Displace_Allocator_Pointer): Subsidiary procedure to Expand_N_Allocator
5987 and Expand_Allocator_Expression. Allocating class-wide interface objects
5988 this routine displaces the pointer to the allocated object to reference
5989 the component referencing the corresponding secondary dispatch table.
5990 Expand_Allocator_Expression): Add missing support to allocate class-wide
5991 interface objects initialized with a qualified expression.
5992 (Get_Allocator_Final_List): Test for an anonymous access type that is a
5993 function result type, and use the finalization list associated with the
5994 function scope in that case (such an anonymous type should not be
5995 treated like an access parameter's type).
5996
59972007-06-06 Ed Schonberg <schonberg@adacore.com>
5998 Gary Dismukes <dismukes@adacore.com>
5999 Javier Miranda <miranda@adacore.com>
6000
6001 * exp_ch5.adb (Expand_N_Assignment_Statement): For the assignment of a
6002 controlled type, use Make_Handler_For_Ctrl_Operation to construct the
6003 required exception handler.
6004 (Expand_Simple_Function_Return, Expand_N_Return_Statement): Handle
6005 properly the case of a function whose return type is a limited
6006 class-wide interface type. Modify the code of the accessibility
6007 check to handle class-wide interface objects. In this case we need to
6008 displace "this" to reference the primary dispatch table to get access
6009 to the TSD of the object (to evaluate its accessibility level).
6010 (Expand_N_Extended_Return_Statement): Test for a tagged result type
6011 rather than a controlling result as one of the conditions for
6012 generating tests of the implicit BIP_Alloc_Form formal. The
6013 initialization assignment is also handled according to whether the
6014 result is tagged instead of controlling.
6015 In the case where the init assignment is inserted in the "then" part of
6016 the allocation conditional, rewrite the target to be a dereference of
6017 the implicit BIP_Object_Access formal.
6018 If the returned value is unconstrained and created on the secondary
6019 stack, mark the enclosing block and function so that the secondary
6020 stack is not reclaimed on return.
6021 Treat returns from functions with controlling results similarly to
6022 returns from functions with unconstrained result subtypes.
6023 If the object returned is unconstrained, and an allocator must be
6024 created for it, analyze the allocator once the block for the extended
6025 return is installed, to ensure that finalizable components
6026 of the expression use the proper finalization list. Guard the call to
6027 Move_Final_List with a check that there is something to finalize.
6028 (Make_Tag_Ctrl_Assignment): Use "old" handling
6029 of controlled type assignment for virtual machines, since new code uses
6030 unsupported features (such as direct access to bytes in memory).
6031
60322007-06-06 Gary Dismukes <dismukes@adacore.com>
6033 Ed Schonberg <schonberg@adacore.com>
6034
6035 * exp_ch6.ads, exp_ch6.adb (Expand_Call): When adding an extra
6036 accessibility actual, check for the case of an aliased object that has
6037 been rewritten as an Access attribute, and assign Prev to Prev_Orig so
6038 we fall into processing for the attribute rather than the name of the
6039 object.
6040 (Expand_Inline_Call): If an actual is a literal, and the corresponding
6041 formal has its address taken in the body, create a temporary to capture
6042 value. If the return type is a limited interface, do not treat the
6043 return value as Controlled.
6044 (Is_In_Place_Function): If the return type is a limited interface,
6045 treat as returning in place. The actual returned object may not always
6046 be limited, but the caller has to assume that it is returned in place.
6047 (Add_Final_List_Actual_To_Build_In_Place_Call): If the call is the
6048 context of an allocator, use the correct finalization chain (that is,
6049 the chain belonging to the access type, rather than the chain belonging
6050 to the current scope).
6051 (Add_Alloc_Form_Actual_To_Build_In_Place_Call): Test for a tagged
6052 result type rather than a controlling result as a precondition for
6053 adding an allocation form actual to a build-in-place call.
6054 (Add_Final_List_Actual_To_Build_In_Place_Call): Ditto.
6055 (Freeze_Subprogram): Code cleanup. Remove all the code that register the
6056 primitive in the dispatch tables. This work is now done by Make_DT when
6057 the type is frozen.
6058 (Register_Predefined_DT_Entry): Removed.
6059 (Add_Return): If end label is not present, use sloc of last statement
6060 for generated return statement in procedure, for better gdb behavior
6061 on expanded code.
6062 (Add_Access_Actual_To_Build_In_Place_Call): Set parent fields of the
6063 object address nodes to ensure proper processing by routines like
6064 Insert_After*.
6065 (Expand_Call): Fix generation of validity check for parameter
6066 (Add_Alloc_Form_Actual_To_Build_In_Place_Call): Return without passing
6067 the allocation form parameter if the result subtype is constrained,
6068 except when the function has a controlling result.
6069 (Add_Final_List_Actual_To_Build_In_Place_Call): Test Controlled_Type
6070 rather than Is_Controlled and Has_Controlled_Component, since we want to
6071 include class-wide result types in this treatment. Also test for a
6072 controlling result, since that also requires passing a finalization
6073 list.
6074 (Make_Build_In_Place_Call_In_Allocator): Call Add_Alloc_Form_Actual_*
6075 even when the result subtype is constrained, to handle calls involving
6076 controlling results.
6077 (Make_Build_In_Place_Call_In_Anonymous_Context): Add_Alloc_Form_Actual_*
6078 is now called even when the result subtype is constrained, to handle
6079 calls involving controlling results.
6080 (Make_Build_In_Place_Call_In_Assignment): Remove test for Is_Constrained
6081 on call to Add_Alloc_Form_Actual_To_Build_In_Place_Call (that procedure
6082 now performs the test).
6083 (Make_Build_In_Place_Call_In_Object_Declaration):
6084 Add_Alloc_Form_Actual_* is now called even when the result subtype is
6085 constrained, to handle calls involving controlling results.
6086 (Add_Return): Accomodate rewritten pattern from local raise to goto
6087 transformation, so that we still recognize an transfer statement
6088 and do the right thing here in that case.
6089 (Expand_N_Subprogram_Body): Add dummy Push/Pop_xxx_Label nodes at start
6090 and end of subprogram code.
6091 (Register_Interface_DT_Entry, Register_Predefined_DT_Entry): Add missing
6092 support for primitives that are functions (without formals) with a
6093 controlling result.
6094 (Inherited_From_Formal): If the actual subtype has not generic parent
6095 type, it is not an actual for a formal derived type, and there is no
6096 operation to inherit from the formal.
6097
60982007-06-06 Ed Schonberg <schonberg@adacore.com>
6099 Thomas Quinot <quinot@adacore.com>
6100
6101 * exp_ch7.ads, exp_ch7.adb (Expand_Cleanup_Actions): Set Sloc of
6102 inserted cleanup code appropriately for GDB use.
6103 (Make_Deep_Proc): Use Make_Handler_For_Ctrl_Operation to create
6104 exception handler for Deep_Adjust or Deep_Finalize.
6105 (Make_Handler_For_Ctrl_Operation): New subprogram. When runtime entity
6106 Raise_From_Controlled_Operation is available, use a call to that
6107 subprogram instead of a plain "raise Program_Error" node to raise
6108 Program_Error if an exception is propagated from an Adjust or Finalize
6109 operation.
6110 (Insert_Actions_In_Scope_Around): If the statement to be wrapped
6111 appears in the optional statement list of a triggering alternative, the
6112 scope actions can be inserted directly there, and not in the list that
6113 includes the asynchronous select itself.
6114
61152007-06-06 Ed Schonberg <schonberg@adacore.com>
6116 Robert Dewar <dewar@adacore.com>
6117 Hristian Kirtchev <kirtchev@adacore.com>
6118
6119 * exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry): Set sloc of
6120 generated exception handler appropriately when debugging generated code.
6121 Deal properly with No_Exception_Propagation restriction mode.
6122 (Expand_N_Abort_Statement): Add an unchecked type conversion from
6123 System.Address to System.Tasking.Task_Id when processing the result of
6124 the predefined primitive _disp_get_task_id.
6125 (Expand_N_Asynchronous_Select): Clarify comment.
6126 (Expand_N_Protected_Type_Declaration): Minor code cleanup.
6127 (Find_Parameter_Type): New routine inside Type_Conformant_Parameters.
6128 (Type_Conformant_Parameters): New parameter Prim_Op_Typ. Code cleanup.
6129 (Add_Private_Declarations, Build_Protected_Body): Use proper slocs for
6130 privals and for generated call to Complete_Entry_Body, for better gdb
6131 behavior.
6132 (Copy_Result_Type): Utility to construct a parameter and result profile
6133 for protected functions whose return type is an anonymous access to
6134 subprogram.
6135 (Build_Protected_Sub_Spec and Expand_Access_Protected_Subprogram_Type):
6136 call the above.
6137 (Build_Task_Activation_Call): Insert Activate_Tasks call at proper
6138 point when the local-raise-to-goto transformation has taken place.
6139
61402007-06-06 Javier Miranda <miranda@adacore.com>
6141 Nicolas Setton <setton@adacore.com>
6142
6143 * exp_dbug.adb (Get_Encoded_Name): Modified to continue providing its
6144 functionality when the backend is generating code.
6145 Otherwise any serious error
6146 reported by the backend calling the frontend routine Error_Msg
6147 changes the Compilation_Mode to Check_Semantics, disables the
6148 functionality of this routine and causes the generation of
6149 spureous additional errors.
6150
6151 * exp_dbug.ads (Pointers to Unconstrained Arrays): Document the
6152 debugging information now generated by the compiler for fat-pointer
6153 types.
6154 Document the contents of DW_AT_producer in the GNAT Vendor extensions to
6155 DWARF2/3.
6156 Document GNAT Vendor extensions to DWARF 2/3 and the "-gdwarf+" switch.
6157
61582007-06-06 Thomas Quinot <quinot@adacore.com>
6159
6160 * exp_dist.ads, exp_dist.adb (Make_Transportable_Check): New subprogram
6161 (GARLIC_Support.Build_Subprogram_Receiving_Stubs,
6162 PolyORB_Support.Build_Subprogram_Receiving_Stubs):
6163 For a remote call to a function with a classwide return type, apply an
6164 E.4(18) check to the returned value.
6165 (Add_RACW_Primitive_Declarations_And_Bodies): Do not generate stubs for
6166 stream attributes of the designated type of an RACW, as they are not
6167 dispatching primitive operations.
6168
61692007-06-06 Geert Bosch <bosch@adacore.com>
6170
6171 * exp_fixd.adb (Integer_Literal): Add optional argument to construct a
6172 negative literal
6173 (Do_Divide_Fixed_Fixed): Add comments to indicate Frac is always
6174 positive
6175 (Do_Divide_Fixed_Universal): Handle case of negative Frac.
6176 (Do_Multiply_Fixed_Fixed): Add coments to indicate Frac is always
6177 positive
6178 (Do_Multiply_Fixed_Universal): Handle case of negative Frac.
6179
61802007-06-06 Javier Miranda <miranda@adacore.com>
6181
6182 * exp_imgv.adb (Expand_Value_Attribute): Disable compilation of this
6183 attribute compiling package Ada.Tags under No_Run_Time_Mode.
6184
61852007-06-06 Javier Miranda <miranda@adacore.com>
6186
6187 * exp_intr.adb (Expand_Unc_Deallocation): Add missing support for
6188 deallocation of class-wide interface objects.
6189 (Expand_Dispatching_Constructor_Call): Take into account that if the
6190 result of the dispatching constructor is an interface type, the
6191 function returns a class-wide interface type; otherwise the returned
6192 object would be actual. The frontend previously accepted returning
6193 interface types because Expand_Interface_Actuals silently performed
6194 the management of the returned type "as if" it were a class-wide
6195 interface type.
6196 (Expand_Dispatching_Constructor_Call): Replace call to
6197 Make_DT_Access_Action by direct call to Make_Function_Call.
6198
61992007-06-06 Robert Dewar <dewar@adacore.com>
6200 Ed Schonberg <schonberg@adacore.com>
6201
6202 * exp_pakd.adb (Expand_Packed_Not): Use RM_Size rather than ESize to
6203 compute masking constant, since we now set Esize properly to the
6204 underlying size.
6205 (Create_Packed_Array_Type): Set proper Esize value adjusted as required
6206 to match the alignment.
6207 (Create_Packed_Array_Type): Use Short_Short_Unsigned as base type for
6208 packed arrays of 8 bits or less.
6209
6210 * freeze.adb (Freeze_Entity): When freezing the formals of a
6211 subprogram, freeze the designated type of a parameter of an access type
6212 only if it is an access parameter.
6213 Increase size of C convention enumeration object
6214 (Freeze_Entity, array type case): Make sure Esize value is properly
6215 adjusted for the alignment if it is known.
6216 (Freeze_Entity, array type case): When checking bit packed arrays for
6217 the size being incorrect, check RM_Size, not Esize.
6218 (Freeze_Record_Type): Check for bad discriminated record convention
6219 (In_Exp_Body): Return true if the body is generated for a subprogram
6220 renaming, either an attribute renaming or a renaming as body.
6221 (Check_Itype): If the designated type of an anonymous access component
6222 is a non-protected subprogram type, indicate that it is frozen, to
6223 prevent out-of-scope freeze node at some subsequent call.
6224 (Freeze_Subprogram): On OpenVMS, reject descriptor passing mechanism
6225 only if the subprogram is neither imported nor exported, as well as the
6226 NCA descriptor class if the subprogram is exported.
6227
62282007-06-06 Ed Schonberg <schonberg@adacore.com>
6229 Arnaud Charlet <charlet@adacore.com>
6230 Robert Dewar <dewar@adacore.com>
6231 Gary Dismukes <dismukes@adacore.com>
6232
6233 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Remove properly a
6234 default initialization on an imported object, when there is no
6235 initialization call generated for it.
6236 (Expand_Pragma_Assert): Add handling of No_Exception_Propagation
6237 restriction
6238
6239 * snames.h, snames.ads, snames.adb, par-prag.adb: New pragma
6240 Static_Elaboration_Desired.
6241 Remove pragma Thread_Body.
6242 Implement a new pragma No_Body
6243 Removes the Explicit_Overriding pragma
6244 Remove Optional_Overriding pragma
6245 (Prag): Deal with Universal_Aliasing.
6246 (Name_CIL, Name_CIL_Constructor, Convention_CIL,
6247 Pragma_CIL_Constructor): New names.
6248
6249 * sem_cat.adb (Validate_Object_Declaration): An initialization that
6250 uses the equivalent aggregate of a type must be treated as an implicit
6251 initialization.
6252 (Get_Categorization): Check a unit for pragma Preelaborate only if it
6253 has none of the other categories.
6254 (Process_Import_Or_Interface_Pragma): Report an error for an attempt
6255 to apply Import to an object renaming declaration.
6256
6257 * sem_prag.adb (Process_Import_Or_Interface): Warn that a type imported
6258 from a C++ class should be declared as limited and that it will be
6259 considererd limited.
6260 (Analyze_Pragma): Warn that a type specified with pragma CPP_Class
6261 should be declared as limited and that it will be considererd limited.
6262 (Ada_2005_Pragma): New procedure, used to deal with Ada 2005 pragmas
6263 (Analyze_Pragma, case Export): Diagnose export of enumeration literal
6264 (Analyze_Pragma): Deal with Universal_Aliasing.
6265 (Sig_Flags): Likewise.
6266 (Set_Encoded_Interface_Name): Suppress encoding when compiling for AAMP.
6267 (Overflow_Checks_Unsuppressed): New flag.
6268 (Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
6269 (Analyze_Pragma [case Pack]): Ignore pragma Pack and post warning in
6270 case of JVM or .NET targets, and compiling user code.
6271 Add debugging convenience routine rv
6272
62732007-06-06 Robert Dewar <dewar@adacore.com>
6274
6275 * exp_strm.adb (Make_Field_Attributes): Avoid _Parent components that
6276 are interface type.
6277 (Build_Elementary_Input_Call): For floating-point use right type in the
6278 absence of strange size or stream size clauses.
6279 (Build_Elementary_Write_Call): Same fix
6280 (Has_Stream_Standard_Rep): Returns False if Stream_Size attribute
6281 set to value that does not match base type size.
6282
62832007-06-06 Ed Schonberg <schonberg@adacore.com>
6284
6285 * exp_util.ads, exp_util.adb (Expand_Subtype_From_Expr): In Ada2005, an
6286 object of a limited type can be initialized with a call to a function
6287 that returns in place. If the limited type has unknown discriminants,
6288 and the underlying type is a constrained composite type, build an actual
6289 subtype from the function call, as is done for private types.
6290 (Side_Effect_Free): An expression that is the renaming of an object or
6291 whose prefix is the renaming of a object, is not side-effect free
6292 because it may be assigned through the renaming and its value must be
6293 captured in a temporary.
6294 (Has_Controlled_Coextensions): New routine.
6295 (Expand_Subtype_From_Expr): Do nothing if type is a limited interface,
6296 as is done for other limited types.
6297 (Non_Limited_Designated_Type): new predicate.
6298 (Make_CW_Equivalent_Type): Modified to handle class-wide interface
6299 objects.
6300 Remove all handling of with_type clauses.
6301
6302 * par-ch10.adb: Remove all handling of with_type clauses.
6303
6304 * lib-load.ads, lib-load.adb (Load_Main_Source): Do not get the
6305 checksum if the main source could not be parsed.
6306 (Loat_Unit): When processing a child unit, determine properly whether
6307 the parent unit is a renaming when the parent is itself a child unit.
6308 Remove handling of with_type clauses.
6309
6310 * sinfo.ads, sinfo.adb (Is_Static_Coextension): New function.
6311 (Set_Is_Static_Coextension): New procedure.
6312 (Has_Local_Raise): New function
6313 (Set_Has_Local_Raise): New procedure
6314 (Renaming_Exception): New field
6315 (Has_Init_Expression): New flag
6316 (Delay_Finalize_Attach): Remove because flag is obsolete.
6317 (Set_Delay_Finalize_Attach): Remove because flag is obsolete.
6318 Remove all handling of with_type clauses.
6319 (Exception_Junk): Can now be set in N_Block_Statement
6320
63212007-06-06 Vincent Celier <celier@adacore.com>
6322 Robert Dewar <dewar@adacore.com>
6323
6324 * frontend.adb (Frontend): Return immediately if the main source could
6325 not be parsed, because of preprocessing errors.
6326
6327 * gnat1drv.adb (gnat1drv): Handle RE_Not_Available gracefully.
6328 (Gnat1drv): Exit with errors if the main source could not be parsed,
6329 because of preprocessing errors.
6330 (Check_Rep_Info): New procedure
6331
63322007-06-06 Robert Dewar <dewar@adacore.com>
6333
6334 * g-hesorg.ads, g-heasor.ads,
6335 g-busorg.ads, g-bubsor.ads: Update documentation
6336 GNAT.Heap/Bubble_Sort_G is now pure
6337
63382007-06-06 Robert Dewar <dewar@adacore.com>
6339
6340 * g-catiio.ads, g-catiio.adb (Image): Check for null picture string
6341
63422007-06-06 Robert Dewar <dewar@adacore.com>
6343 Ed Schonberg <schonberg@adacore.com>
6344
6345 * g-comlin.ads, g-comlin.adb:
6346 Add new warning for renaming of function return objects
6347
6348 * opt.adb (Tree_Write, Tree_Read): Use proper expressions for size
6349 (Tree_Read): Use size of object instead of type'object_size, since the
6350 latter is incorrect for packed array types.
6351 (Tree_Write): Same fix
6352
6353 * opt.ads: Add new warning for renaming of function return objects
6354 (Generating_Code): New boolean variable used to indicate that the
6355 frontend as finished its work and has called the backend to process
6356 the tree and generate the object file.
6357 (GCC_Version): Is now private
6358 (Static_Dispatch_Tables): New constant declaration.
6359 (Overflow_Checks_Unsuppressed): New flag.
6360 (Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
6361 (List_Closure): New flag for gnatbind (-R)
6362 Zero_Formatting: New flag for gnatbind (-Z)
6363 (Special_Exception_Package_Used): New flag.
6364 (Warn_On_Unrepped_Components): New flag.
6365
6366 * sem_ch8.adb (Check_Library_Unit_Renaming): Check that the renamed
6367 unit is a compilation unit, rather than relying on its scope, so that
6368 Standard can be renamed.
6369 (Analyze_Object_Renaming): Add new warning for renaming of function
6370 return objects.
6371 Also reject attempt to rename function return object in Ada 83 mode.
6372 (Attribute_Renaming): In case of tagged types, add the body of the
6373 generated function to the freezing actions of the type.
6374 (Find_Type): A protected type is visible right after the reserved word
6375 "is" is encountered in its type declaration. Set the entity and type
6376 rather than emitting an error message.
6377 (New_Scope): Properly propagate Discard_Names to inner scopes
6378 (Check_Nested_Access): New procedure.
6379 (Has_Nested_Access, Set_Has_Nested_Access): New procedures.
6380 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
6381
6382 * sem_warn.ads, sem_warn.adb: Improvements to infinite loop warning
6383 Add new warning for renaming of function return objects
6384 (Check_References): Suppress warnings for objects whose type or
6385 base type has Warnings suppressed.
6386 (Set_Dot_Warning_Switch): Add processing for -gnatw.c/C
6387 (Set_Warning_Switch): Include new -gnatwc in -gnatwa
6388
63892007-06-06 Vincent Celier <celier@adacore.com>
6390 Emmanuel Briot <briot@adacore.com>
6391 Olivier Hainque <hainque@adacore.com>
6392
6393 * g-debpoo.ads, g-debpoo.adb (Free_Physically.Free_Blocks): Use the
6394 absolute value of Header.Block_Size when displaying the freed physical
6395 memory in traces.
6396 (Allocate): Compute Storage_Address using Integer_Address, not
6397 Storage_Offset, because the range of Storage_Offset may not be large
6398 enough.
6399 (Configure): New parameter Low_Level_Traces
6400 (Allocate, Deallocation, Free_Physically): Added low-level traces
6401 (Configure): new parameter Errors_To_Stdout.
6402 (Output_File): new subprogram
6403 (Deallocate, Dereference): Send error messages to the proper stream
6404 (Print_Pool, Print_Info_Stdout): Make sure the output goes to stdout, as
6405 documented. Previous code would send it to the current output file
6406 defined in GNAT.IO, which might not be stdout
6407 (Is_Valid): Adjust comment to mention that a positive reply means that
6408 Header_Of may be used to retrieve the allocation header associated with
6409 the subprogram Storage address argument. Return False early if this
6410 address argument is misaligned.
6411
64122007-06-06 Vincent Celier <celier@adacore.com>
6413
6414 * gnatcmd.adb (GNATCmd): Accept switch -aP for commands that accept
6415 switch -P
6416 (ASIS_Main): New global variable
6417 (Get_Closure): New procedure
6418 (GNATCmd): Set ASIS_Main when -P and -U with a main is used for gnat
6419 check, metric or pretty. Call Get_Closure in this case.
6420 (Check_Files): For GNAT LIST, check all sources of all projects when
6421 All_Projects is True.
6422 (GNATCmd): Accept -U for GNAT LIST
6423
64242007-06-06 Vincent Celier <celier@adacore.com>
6425
6426 * gnatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK=
6427 has been specified
6428 Correct error message when invocation of the linker fails
6429 Add explicit size clause for the C imported variables
6430 Object_List_File_Supported and Using_GNU_Linker to emphasize that
6431 we expect char size.
6432 Read target parameters earlier, since this is needed to set
6433 Target_VM properly. Also do not use -static/shared-libgcc for non GCC
6434 targets.
6435
64362007-06-06 Vincent Celier <celier@adacore.com>
6437
6438 * gnatls.adb:
6439 Add 3 spaces before the default project directory when displaying
6440 the project search path.
6441 Add new command line switch '-l' to display license information.
6442
64432007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
6444
6445 * gmem.c: Add support for timestamps on memory operations.
6446
6447 * memtrack.adb, gnatmem.adb: Add support for timestamps on memory
6448 operations (not used currently, just foundation for future
6449 enhancements). Add possibility to perform full dump of gmem.out file.
6450 (Print_Back_Traces): Declare accesses to root arrays constants since
6451 they aren't modified.
6452 (Print_Back_Traces): allocate root arrays on the heap rather than stack.
6453
64542007-06-06 Vincent Celier <celier@adacore.com>
6455
6456 * gnatsym.adb: Update Copyright notice
6457 (Parse_Cmd_Line): Accept new switch -D
6458 (Gnatsym): In Direct policy (switch -D) copy reference file to symbol
6459 file.
6460
6461 * prj.ads (Policy): New policy Direct
6462 (Yes_No_Unknown): New enumeration type
6463 (Project_Data): New component Libgnarl_Needed
6464
6465 * prj-nmsc.adb (Check_For_Source): When recording a source file make
6466 use the untouched pathname casing.
6467 (Get_Directories): Ensure that the Display_Exec_Directory is using the
6468 proper casing on non case-sensitive platforms like Windows.
6469 (Get_Unit): Accept file names x__... and x~... (where x = a, g, i or s)
6470 on all platforms, as it is not possible to know which one is allowed
6471 before processing the project files.
6472 (Check_Stand_Alone_Library): Check that Library_Reference_Symbol_File is
6473 specified when symbol policy is Direct. Check that when there is a
6474 symbol file defined (either by default or with attribute
6475 Library_Symbol_File) it is not the same as the reference symbol file.
6476 (Check_Stand_Alone_Library): Recognize new symbol policy Direct.
6477 (Look_For_Sources): Allow Locally_Removed_Files to be declare in non
6478 extending projects.
6479 (Record_Ada_Source): Record a source that has been locally removed in an
6480 imported project.
6481
6482 * symbols.ads (Policy): New policy Direct
6483
6484 * symbols-vms.adb (Initialize): Take new policy Direct in case
6485 statement
6486
64872007-06-06 Vincent Celier <celier@adacore.com>
6488
6489 * g-os_lib.ads, g-os_lib.adb (Normalize_Pathname.Get_Directory):
6490 Correct obvious bug (return Dir; instead of return Directory;).
6491 (Normalize_Pathname): Use Reference_Dir'Length, not Reference_Dir'Last
6492
64932007-06-06 Thomas Quinot <quinot@adacore.com>
6494
6495 * g-pehage.adb (Produce): Open output files in Binary mode, so that
6496 they have UNIX line endings (LF only) even on Windows, and thus pass
6497 all GNAT style checks.
6498
64992007-06-06 Emmanuel Briot <briot@adacore.com>
6500
6501 * g-regpat.adb (Quote): Fix improper quoting of '.'
6502
65032007-06-06 Thomas Quinot <quinot@adacore.com>
6504
6505 * g-soccon.ads: Add new constant Thread_Blocking_IO, always True by
6506 default, set False on a per-runtime basis.
6507 (Need_Netdb_Buffer): New constant.
6508
6509 * g-socket.ads, g-socket.adb: Import new package
6510 GNAT.Sockets.Thin.Task_Safe_NetDB.
6511 (Raise_Host_Error): Use Host_Error_Message from platform-specific thin
6512 binding to obtain proper message.
6513 (Close_Selector): Use GNAT.Sockets.Thin.Signalling_Fds.Close.
6514 Replace various occurrences of Arry (Arry'First)'Address with the
6515 equivalent Arry'Address (GNAT always follows implementation advice from
6516 13.3(14)).
6517 (Get_Host_By_Address, Get_Host_By_Name,
6518 Get_Service_By_Name, Get_Service_By_Port): Do not use GNAT.Task_Lock;
6519 instead, rely on platform-specific task safe netdb operations provided
6520 by g-socthi.
6521
6522 * g-socthi.ads, g-socthi.adb (Initialize): Remove obsolete formal
6523 parameter Process_Blocking_IO.
6524 (Host_Error_Messages): Add stub body.
6525 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
6526 (Safe_Gethostbyname, Safe_Gethostbyaddr, Safe_Getservbyname,
6527 Safe_Getservbyport): Move functions into new child package
6528 Task_Safe_NetDB.
6529 (Nonreentrant_Gethostbyname, Nonreentrant_Gethostbyaddr,
6530 Nonreentrant_Getservbyname, Nonreentrant_Getservbyport): New routines.
6531 (In_Addr): Add alignment clause.
6532
65332007-06-06 Robert Dewar <dewar@adacore.com>
6534
6535 * g-trasym.ads, g-traceb.ads: Update list of supported targets
6536 Add note about symbolic traceback
6537
65382007-06-06 Pascal Obry <obry@adacore.com>
6539
6540 * hostparm.ads (Normalized_CWD): Use the host directory separator
6541 instead of the hardcoded forward slash which is not the proper
6542 character on Windows for example.
6543 (Java_VM): Removed.
6544
65452007-06-06 Vincent Celier <celier@adacore.com>
6546 Arnaud Charlet <charlet@adacore.com>
6547
6548 * a-clrefi.adb, a-clrefi.ads: New files
6549
6550 * impunit.adb: Add s-os_lib in the list of user visible units.
6551 (Non_Imp_File_Names_95): Add a-clrefi to this list
6552 Remove obsolete run-time entries.
6553 (Non_Imp_File_Names_05): Add Ada 2005 entries for:
6554 "a-exetim" -- Ada.Execution_Time
6555 "a-extiti" -- Ada.Execution_Time.Timers
6556
6557 * mlib-prj.ads, mlib-prj.adb
6558 (Build_Library): Use untouched object dir and library dir. At the
6559 same time makes sure that the checks are done using the canonical
6560 form. Removes hard-coded directory separator and use the proper host
6561 one instead.
6562 (Process_Project): Do not look in object directory to check if libgnarl
6563 is needed for a library, if there is no object directory.
6564 (Build_Library): Scan the ALI files to decide if libgnarl is needed for
6565 linking.
6566 (Build_Library): When invoking gnatbind, use a response file if the
6567 total size of the arguments is too large.
6568
6569 * Makefile.rtl: (g-sttsne): New object file.
6570 Add entry for a-clrefi, s-utf_32, System.Exceptions
6571
6572 * Make-lang.in: Remove bogus dependency of s-memory.o on memtrack.o.
6573 (GNAT_ADA_OBJS, GNATBIND_OBJS): Add s-except.o.
6574 (GNATBIND_OBJS): Add new objects a-clrefi.o and a-comlin.o
6575 Change g-string to s-string, g-os_lib to s-os_lib
6576 Change all g-utf_32 references to s-utf_32
6577
65782007-06-06 Tristan Gingold <gingold@adacore.com>
6579 Olivier Hainque <hainque@adacore.com>
6580
6581 * init.c: Do not adjust IP of an imported VMS exception of ia64.
6582 LIB$STOP is called to raise an exception and the IP of the exception
6583 is the instruction right after the call.
6584 (__gnat_adjust_context_for_raise, AIX): Implement.
6585 (__gnat_error_handler, AIX): Accept SIGINFO related arguments and call
6586 adjust_context_for_raise before Raise_From_Signal_Hanler.
6587 (__gnat_install_handler, AIX): Add SA_SIGINFO to the sa_flags, to ensure
6588 siginfo is passed to the handler, necessary to let the zcx propagation
6589 engine unwind past it.
6590
65912007-06-06 Olivier Hainque <hainque@adacore.com>
6592
6593 * initialize.c (__gnat_initialize for vxworks): Update documentation
6594 on the ZCX support, using different sets of crtstuff objects than with
6595 GCC 3.4.
6596
65972007-06-06 Robert Dewar <dewar@adacore.com>
6598
6599 * layout.ads, layout.adb (Adjust_Esize_Alignment): Move spec to package
6600 spec from body
6601 (Layout_Type): Fix recomputation of size from alignment.
6602
66032007-06-06 Ed Schonberg <schonberg@adacore.com>
6604 Javier Miranda <miranda@adacore.com>
6605
6606 * sem_ch12.adb (Analyze_Associations): Diagnose use of an others
6607 association in an instance.
6608 (Copy_Generic_Node): If the node is a string literal, no need to copy
6609 its descendants.
6610 (Is_Generic_Formal): For a formal subprogram, the declaration is the
6611 grandparent of the entity.
6612 (Analyze_Formal_Interface_Type): Transform into a full type declaration,
6613 to simplify handling of formal interfaces that derive from other formal
6614 interfaces.
6615 (Instantiate_Subprogram_Body): The defining unit name of the body of
6616 the instance should be a defining identifier.
6617 (Install_Formal_Packages): make global to the package, for use in
6618 instantiations of child units.
6619 (Analyze_Package_Instantiation): Do not attempt to set information on an
6620 enclosing master of an entry when expansion is disabled.
6621 (Instantiate_Type): If the actual is a tagged synchronized type and the
6622 generic ancestor is an interface, create a generic actual for the
6623 corresponding record.
6624 (Analyze_Formal_Derived_Interface_Type): Rewrite as a derived type
6625 declaration, to ensure that the interface list is processed correctly.
6626 (Inline_Instance_Body): If enclosing scope is an instance body, remove
6627 its entities from visibiility as well.
6628 (Pre_Analyze_Actuals): if the actual is an allocator with constraints
6629 given with a named association, analyze the expression only, not the
6630 discriminant association itself.
6631 (Reset_Entity): If the analysis of a selected component is transformed
6632 into an expanded name in the prefix of a call with parameters, do not
6633 transform the original node into an expanded name, to prevent visibility
6634 errors in the case of nested generics.
6635 (Check_Private_View): For an array type, check whether the index types
6636 may need exchanging.
6637
66382007-06-06 Arnaud Charlet <charlet@adacore.com>
6639 Vincent Celier <celier@adacore.com>
6640
6641 * lib-writ.adb: Handle Convention_CIL in addition to Convention_Java,
6642 since both are separated.
6643 Add support for imported CIL packages.
6644 Add further special handling of "value_type" for CIL.
6645 Add special handling of pragma Import for CIL.
6646
6647 * make.ads, make.adb: When switch -eS is used, direct all outputs to
6648 standard output instead of standard error, except errors.
6649 (Absolute_Path): Use untouched casing for the parent directory.
6650 (Add_Library_Search_Dir): Use the untouched directory name.
6651 (Add_Source_Search_Dir): Idem.
6652 (Change_To_Object_Directory): Update output to use proper casing.
6653 (Create_Binder_Mapping_File): Use the untouched filename to set
6654 ALI_Name.
6655 (Gnatmake): Use untouched library and executable directory names.
6656 (Insert_Project_Sources): Use untouched filename for spec and body.
6657 (Is_In_Object_Directory): Use untouched object directory.
6658 (Mark_Directory): Idem.
6659 (Collect_Arguments_And_Compile): Ensure that Full_Source_File always
6660 contains the non-canonical filename in all cases.
6661 (Change_To_Object_Directory): In verbose mode, display the name of the
6662 object directory we're changing to.
6663 (Compile_Sources): Make sure, when a project file is used, to compile
6664 the body of the unit, when there is one, even when only the spec is
6665 recorded in an ALI file.
6666 (Gcc_Switches, Binder_Switches, Linker_Switches): Tables moved from the
6667 spec to the body.
6668 (Report_Compilation_Failed): New procedure
6669 (Bind, Display_Commands, Compile_Sources, Initialize, Scan_Make_Arg):
6670 procedures moved from the spec to the body.
6671 (Extract_Failure): Removed, not used
6672 Replace explicit raises of exception Bind_Failed and Link_Failed with
6673 calls to Make_Failed with the proper message.
6674 Replace explicit raises of exception Compilation_Failed with calls to
6675 procedure Report_Compilation_Failed.
6676 (Initialize): Create mapping files unconditionally when using project
6677 files.
6678
6679 * sem_mech.adb: (Name_CIL, Name_CIL_Constructor, Convention_CIL,
6680 Pragma_CIL_Constructor): New names.
6681
6682 * targparm.ads, targparm.adb
6683 (Compiler_System_Version): Removed, no longer used.
6684 (Get_Target_Parameters): Relax checks on system.ads validity. Add
6685 handling of two new system flags: JVM and CLI.
6686
66872007-06-06 Jose Ruiz <ruiz@adacore.com>
6688 Arnaud Charlet <charlet@adacore.com>
6689
6690 * Makefile.in (LIBGNAT_TARGET_PAIRS for VxWorks 6): For the RTP run
6691 time, use the default s-interr body that provides interrupt support
6692 based on signals.
6693 (LIBGNAT_TARGET_PAIRS for x86-linux): Use specialized versions of
6694 a-exetim.ad{s,b}, a-extiti.ad{s,b}, a-rttiev.ad{s,b}, s-osinte.ad{s,b},
6695 g-soccon.ads, and s-taprop.adb for the marte run time.
6696 (EXTRA_GNATRTL_TASKING_OBJS for x86-linux): Execution time clocks and
6697 timers are supported on marte.
6698 (EH_MECHANISM for marte): Do not use ZCX.
6699 (THREADSLIB for marte): Use -lmarte.
6700 Add mlib-tgt-vms.o to the list of objects for gnatmake for VMS
6701 Add mlib-tgt-specific.o to gnatmake objects
6702 mlib-tgt-<platforms>.adb is now the body of MLib.Tgt.Specific, no
6703 longer of MLib.Tgt.
6704 (LIBGNAT_TARGET_PAIRS for vxworks): When building a run time for VxWorks
6705 6, either kernel or rtp, use a specialized version of s-osinte.ads.
6706
67072007-06-06 Pascal Obry <obry@adacore.com>
6708
6709 * mkdir.c (__gnat_mkdir): Add support for UTF-8.
6710
67112007-06-06 Vincent Celier <celier@adacore.com>
6712
6713 * mlib.ads, mlib.adb (Build_Library): Do not use hard-coded directory
6714 separator, use instead the proper host directory separator.
6715 (Copy_ALI_Files): Make sure that an already existing ALI file in the
6716 ALI copy dir is writable, before doing the copy.
6717
6718 * mlib-utl.ads, mlib-utl.adb:
6719 (Gcc): If length of command line is too long, put the list of object
6720 files in a response file, if this is supported by the platform.
6721 (Ar): If invocation of the archive builder is allowed to be done in
6722 chunks and building it in one shot would go above an OS dependent
6723 limit on the number of characters on the command line, build the archive
6724 in chunks.
6725
67262007-06-06 Vincent Celier <celier@adacore.com>
6727
6728 * osinte-c.ads, osint-c.adb (Set_Library_Info_Name): Fail if base name
6729 of specified object file is not equal to base name of source.
6730
67312007-06-06 Javier Miranda <miranda@adacore.com>
6732 Hristian Kirtchev <kirtchev@adacore.com>
6733 Ed Schonberg <schonberg@adacore.com>
6734
6735 * sem_ch3.adb (Process_Full_View): Propagate the CPP_Class attribute to
6736 the full type declaration.
6737 (Analyze_Component_Declaration): Add local variable E to capture the
6738 initialization expression of the declaration. Replace the occurences of
6739 Expression (N) with E.
6740 (OK_For_Limited_Init_In_05): Allow initialization of class-wide
6741 limited interface object with a function call.
6742 (Array_Type_Declaration): If the declaration lacks subtype marks for
6743 indices, create a simple index list to prevent cascaded errors.
6744 (Is_Null_Extension): Ignore internal components created for secondary
6745 tags when checking whether a record extension is a null extension.
6746 (Check_Abstract_Interfaces): Add missing support for interface subtypes
6747 and generic formals.
6748 (Derived_Type_Declaration): Add missing support for interface subtypes
6749 and generic formals.
6750 (Analyze_Object_Declaration): If an initialization expression is
6751 present, traverse its subtree and mark all allocators as static
6752 coextensions.
6753 (Add_Interface_Tag_Component): When looking for components that may be
6754 secondary tags, ignore pragmas that can appear within a record
6755 declaration.
6756 (Check_Abstract_Overriding): an inherited function that dispatches on
6757 result does not need to be overriden if the controlling type is a null
6758 extension.
6759 (Mentions_T): Handle properly a 'class attribute in an anonymous access
6760 component declaration, when the prefix is an expanded name.
6761 (Inherit_Component): If the derivation is for a private extension,
6762 inherited components remain visible and their ekind should not be set
6763 to Void.
6764 (Find_Type_Of_Object): In the case of an access definition, always set
6765 Is_Local_Anonymous_Access. We were previously not marking the anonymous
6766 access type of a return object as a local anonymous type.
6767 (Make_Index): Use Ambiguous_Character to report ambiguity on a discrete
6768 range with character literal bounds.
6769 (Constrain_Array): Initialize the Packed_Array_Type field to Empty.
6770 (Access_Subprogram_Declaration): Indicate that the type declaration
6771 depends on an incomplete type only if the incomplete type is declared
6772 in an open scope.
6773 (Analyze_Subtype_Declaration): Handle properly subtypes of
6774 synchronized types that are tagged, and that may appear as generic
6775 actuals.
6776 (Access_Subprogram_Declaration): An anonymous access to subprogram can
6777 appear as an access discriminant in a private type declaration.
6778 (Add_Interface_Tag_Components): Complete decoration of the component
6779 containing the tag of a secondary dispatch table and the component
6780 containing the offset to the base of the object (this latter component
6781 is only generated when the parent type has discriminants --as documented
6782 in this routine).
6783 (Inherit_Components): Use the new decoration of the tag components to
6784 improve the condition that avoids inheriting the components associated
6785 with secondary tags of the parent.
6786 (Build_Discriminanted_Subtype): Indicate to the backend that the
6787 size of record types associated with dispatch tables is known at
6788 compile time.
6789 (Analyze_Subtype_Declaration): Propagate Is_Interface flag when needed.
6790 (Analyze_Interface_Declaration): Change setting of Is_Limited_Interface
6791 to include task, protected, and synchronized interfaces as limited
6792 interfaces.
6793 (Process_Discriminants): Remove the setting of
6794 Is_Local_Anonymous_Access on the type of (anonymous) access
6795 discriminants of nonlimited types.
6796 (Analyze_Interface_Type_Declaration): Complete the decoration of the
6797 class-wide entity it is is already present. This situation occurs if
6798 the limited-view has been previously built.
6799 (Enumeration_Type_Declaration): Initialize properly the Enum_Pos_To_Rep
6800 field.
6801 (Add_Interface_Tag_Components.Add_Tag): Set the value of the attribute
6802 Related_Interface.
6803
68042007-06-06 Ed Schonberg <schonberg@adacore.com>
6805
6806 * sem_aggr.adb (Resolve_Record_Aggregate): Ignore internal components
6807 of the type that specify the position of interface tags when the type
6808 inherits discriminated array components from the parent type.
6809 If a component is initialized with a box, check for the presence of a
6810 default expression in its declaration before using its default
6811 initialization procedure.
6812 (Resolve_Record_Aggregate): If a component is box-initialized, and the
6813 component type has a discriminants, create a partial aggregate for it
6814 by copying the discriminants of the component subtype.
6815 Reject attempt to initialize a discriminant with a box.
6816 (Array_Aggr_Subtype): Indicate to the backend that the size of arrays
6817 associated with dispatch tables is known at compile time.
6818 (Get_Value): If an association in a record aggregate has a box
6819 association, and the corresponding record component has a default
6820 expression, always copy the default expression, even when the
6821 association has a single choice, in order to create a proper
6822 association for the expanded aggregate.
6823
68242007-06-06 Ed Schonberg <schonberg@adacore.com>
6825 Robert Dewar <dewar@adacore.com>
6826
6827 * par-ch12.adb (P_Generic_Associations): The source position of an
6828 Others association is that of the others keyword, not that of the token
6829 that follows the box.
6830 (P_Formal_Type_Definition): Handle formal access types that carry a
6831 not null indicator.
6832
6833 * par-ch3.adb (P_Known_Discriminant_Part_Opt, P_Component_Items): If
6834 multiple identifier are present, save Scan_State before scanning the
6835 colon, to ensure that separate trees are constructed for each
6836 declaration.
6837 (P_Identifier_Declarations): For object declaration, set new flag
6838 Has_Init_Expression if initialization expression present.
6839 (P_Null_Exclusion): Properly diagnose NOT NULL coming before NULL
6840 Improve NOT NULL error messages
6841
68422007-06-06 Robert Dewar <dewar@adacore.com>
6843
6844 * par-ch4.adb: (P_Name): Recover from literal used as name
6845
68462007-06-06 Vincent Celier <celier@adacore.com>
6847
6848 * prep.ads, prep.adb (Expression): New Boolean parameter Complemented,
6849 defaulted to False.
6850 In the "not" case, recursive call with Complemented set to True.
6851 Do not allow "or" or "and" operators when Complemented is True.
6852
68532007-06-06 Vincent Celier <celier@adacore.com>
6854
6855 * prj.adb (Project_Empty): Gives default value for new component
6856 Libgnarl_Needed
6857
6858 * prj-attr.ads: Minor reformatting
6859
6860 * prj-env.ads, prj-env.adb (For_All_Object_Dirs): Register object
6861 directory using the untouched casing.
6862 (For_All_Source_Dirs): Idem.
6863
6864 * prj-ext.ads, prj-ext.adb (Search_Directories): New table to record
6865 directories specified with switches -aP.
6866 (Add_Search_Project_Directory): New procedure
6867 (Initialize_Project_Path): Put the directories in table
6868 Search_Directories in the project search path.
6869 (Initialize_Project_Path): For VMS, transform into canonical form the
6870 project path.
6871
68722007-06-06 Arnaud Charlet <charlet@adacore.com>
6873
6874 * restrict.ads, restrict.adb (No_Exception_Handlers_Set): Only return
6875 true if configurable run-time or No_Run_Time is set.
6876 (Set_Restriction): Avoid setting restriction No_Elaboration_Code when
6877 processing an unit which is not the one being compiled.
6878
68792007-06-06 Arnaud Charlet <charlet@adacore.com>
6880
6881 * s-arit64.adb: Replace System.Pure_Exceptions by Ada 05 syntax.
6882 Replace UC by Ada.UC
6883
6884 * s-bitops.adb: Get rid of System.Pure_Exceptions.
6885 Replace UC by Ada.UC
6886
68872007-06-06 Robert Dewar <dewar@adacore.com>
6888
6889 * scng.adb: (Check_End_Of_Line): Deal with very long lines
6890
68912007-06-06 Robert Dewar <dewar@adacore.com>
6892
6893 * sem.ads, sem.adb (Semantics): Save and restore Global_Discard_Names
6894 Remove no longer used nodes.
6895
68962007-06-06 Javier Miranda <miranda@adacore.com>
6897 Ed Schonberg <schonberg@adacore.com>
6898 Robert Dewar <dewar@adacore.com>
6899
6900 * sem_ch10.ads, sem_ch10.adb (Analyze_Compilation_Unit): Disable check
6901 on obsolescent withed unit in case of limited-withed units.
6902 (Analyze_Compilation_Unit): Add guard to code that removed an
6903 instantiation from visibility, to prevent compiler aborts when
6904 instantiation is abandoned early on.
6905 (Install_Limited_Withed_Unit): Recognize a limited-with clause on the
6906 current unit being analyzed, and Distinguish local incomplete types
6907 from limited views of types declared elsewhere.
6908 (Build_Limited_Views.Decorate_Tagged_Type): Add documentation
6909 to state that the class-wide entity is shared by the limited-view
6910 and the full-view.
6911 (Analyze_With_Clause): Improve placement of flag for case of
6912 unimplemented unit.
6913 (Analyze_With_Clause): Recognize use of GNAT.Exception_Traces in a
6914 manner similar to GNAT.Current_Exception. This is a violation of
6915 restriction (No_Exception_Propagation), and also inhibits the
6916 optimization of local raise to goto.
6917 (Analyze_With_Clause): Check for Most_Recent_Exception being with'ed,
6918 and if so set Most_Recent_Exception_Used flag in Opt, and also check
6919 for violation of restriction No_Exception_Propagation.
6920
69212007-06-06 Javier Miranda <miranda@adacore.com>
6922 Hristian Kirtchev <kirtchev@adacore.com>
6923 Gary Dismukes <dismukes@adacore.com>
6924
6925 * sem_ch11.adb (Analyze_Exception_Handlers): Add barrier to avoid the
6926 use of entity Exception_Occurrence if it is not available in the
6927 target run-time.
6928
6929 * sem_ch9.adb (Analyze_Protected_Type, Analyze_Task_Type): When
6930 concurrent types are declared within an Ada 2005 generic, build their
6931 corresponding record types since they are needed for overriding-related
6932 semantic checks.
6933 (Analyze_Protected_Type): Rearrange and simplify code for testing that a
6934 protected type does not implement a task interface or a nonlimited
6935 interface.
6936 (Analyze_Task_Type): Rearrange and simplify code for testing that a task
6937 type does not implement a protected interface or a nonlimited interface.
6938 (Single_Task_Declaration, Single_Protected_Declaration): use original
6939 entity for variable declaration, to ensure that debugging information
6940 is correcty generated.
6941 (Analyze_Protected_Type, Analyze_Task_Type): Do not call expander
6942 routines if the expander is not active.
6943 (Analyze_Task_Body): Mark all handlers to stop optimization of local
6944 raise, since special things happen for task exception handlers.
6945
6946 * sem_disp.adb (Check_Controlling_Formals): Add type retrieval for
6947 concurrent types declared within a generic.
6948 (Check_Dispatching_Operation): Do not emit warning about late interface
6949 operations in the context of an instance.
6950 (Check_Dispatching_Call): Remove restriction against calling a
6951 dispatching operation with a limited controlling result.
6952 (Check_Dispatching_Operation): Replace calls to Fill_DT_Entry and
6953 Register_Interface_DT_Entry by calls to Register_Primitive.
6954 (Check_Dispatching_Formals): Handle properly a function with a
6955 controlling access result.
6956
69572007-06-06 Robert Dewar <dewar@adacore.com>
6958 Arnaud Charlet <charlet@adacore.com>
6959
6960 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Stream_Size):
6961 Check for restriction No_Implementation_Attributes if in Ada 95 mode.
6962 (Storage_Pool): Do not crash when RE_Stack_Bounded_Pool is not available
6963 (Analyze_Attribute_Definition_Clause [External_Tag]): Generate error
6964 message when using a VM, since this attribute is not supported.
6965 (Analyze_Record_Representation_Clause): Give unrepped component warnings
6966
6967 * usage.adb: Add new warning for renaming of function return objects
6968 Indicate that -gnatwp and -gnatwP concern front-end inlining
6969 Add line for -gnatyg
6970 Add usage information for -gnatw.c/C
6971
69722007-06-06 Robert Dewar <dewar@adacore.com>
6973 Ed Schonberg <schonberg@adacore.com>
6974
6975 * sem_ch5.adb
6976 (Find_Var): Do not consider function call in test for infinite loop
6977 warning if warnings set off for function entity.
6978 (One_Bound): Do not create a temporary for a loop bound if it is a
6979 character literal.
6980 (Analyze_Assignment): Traverse the right hand side of an assignment and
6981 mark all allocators as static coextensions.
6982 (Analyze_Assignment): Exempt assignments involving a dispatching call
6983 to a function with a controlling access result from the check requiring
6984 the target to be class-wide.
6985
69862007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
6987 Ed Schonberg <schonberg@adacore.com>
6988 Robert Dewar <dewar@adacore.com>
6989 Javier Miranda <miranda@adacore.com>
6990
6991 * sem_res.ads, sem_res.adb (Process_Allocator): Do not propagate the
6992 chain of coextensions when an allocator serves as the root of such a
6993 chain.
6994 (Propagate_Coextensions): Remove the test for the root being an
6995 allocator.
6996 (Resolve_Allocator): Add condition to ensure that all future decoration
6997 occurs on an allocator node. Add processing and cleanup for static
6998 coextensions.
6999 (Valid_Conversion): If the operand type is the limited view of a
7000 class-wide type, use the non-limited view is available to determine
7001 legality of operation.
7002 (Ambiguous_Character): move to spec, for use elsewhere.
7003 (Ambiguous_Character): Handle Wide_Wide_Character in Ada 2005 mode
7004 (Resolve_Range): Diagnose properly an ambiguous range whose bounds are
7005 character literals.
7006 (Resolve_Arithmetic_Op): Call Activate_Division_Check instead of setting
7007 Do_Division_Check flag explicitly.
7008 (Resolve_Actuals): If the actual is of a synchronized type, and the
7009 formal is of the corresponding record type, this is a call to a
7010 primitive operation of the type, that is declared outside of the type;
7011 the actual must be unchecked-converted to the type of the actual
7012 (Resolve_Call): Kill all current values for any subprogram call if
7013 flag Suppress_Value_Tracking_On_Call is set.
7014 (Resolve_Type_Conversion): Generate error message the the operand
7015 or target of interface conversions come from a limited view.
7016 (Check_Infinite_Recursion): Ignore generated calls
7017 (Check_Allocator_Discrim_Accessibility): New procedure for checking
7018 that an expression that constrains an access discriminant in an
7019 allocator does not denote an object with a deeper level than the
7020 allocator's access type.
7021 (Resolve_Allocator): In the case of an allocator initialized by an
7022 aggregate of a discriminated type, check that associations for any
7023 access discriminants satisfy accessibility requirements by calling
7024 Check_Allocator_Discrim_Accessibility.
7025 (Resolve_Equality_Op): Handle comparisons of anonymous access to
7026 subprogram types in the same fashion as other anonymous access types.
7027 (Resolve_Concatenation_Arg): Remove initial character '\' in an error
7028 message that is not a continuation message.
7029 (Resolve_Type_Conversion): Add missing support for conversion to
7030 interface type.
7031 (Resolve_Actuals): Introduce a transient scope around the call if an
7032 actual is a call to a function returning a limited type, because the
7033 resulting value must be finalized after the call.
7034 (Resolve_Actuals): If the call was given in prefix notations, check
7035 whether an implicit 'Access reference or implicit dereference must be
7036 added to make the actual conform to the controlling formal.
7037
70382007-06-06 Robert Dewar <dewar@adacore.com>
7039 Javier Miranda <miranda@adacore.com>
7040
7041 * sem_ch7.adb (Check_Anonymous_Access_Types): Fix error for null body
7042 (Derive_Inherited_Private_Subprogram): Code cleanup. In case of explicit
7043 overriding of an inherited private subprogram now there is no need to
7044 inherit its dispatching slot and reduce the size of the dispatch table.
7045 Set_All_DT_Position now ensures that the same slot is now assigned to
7046 both entities. This is required to statically build the dispatch table.
7047 (Declare_Inherited_Private_Subprograms): Rewriten to avoid the need
7048 of calling Set_All_DT_Position to re-evaluate the position of the
7049 entries in the dispatch table. Such reevaluation is not desired if
7050 the tagged type is already frozen.
7051
70522007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
7053 Gary Dismukes <dismukes@adacore.com>
7054 Robert Dewar <dewar@adacore.com>
7055 Javier Miranda <miranda@adacore.com>
7056
7057 * sem_util.ads, sem_util.adb (May_Be_Lvalue): A prefix of an attribute
7058 reference acts as an lvalue when the attribute name modifies the prefix
7059 (Is_Coextension_Root): New routine.
7060 (Mark_Static_Coextensions): New routine.
7061 (Type_Access_Level): Revise code for checking the level of the
7062 anonymous access type of a return object.
7063 (Safe_To_Capture_Value): Not safe to capture if Address_Taken
7064 (Matches_Prefixed_View_Profile): Remove the no longer necessary
7065 retrieval of the corresponding controlling record type.
7066 (Find_Overridden_Synchronized_Primitive): Code cleanup. Add handling of
7067 concurrent types declared within a generic as well as class wide types.
7068 Emit a mode incompatibility error whenever a protected entry or routine
7069 override an interface routine whose first parameter is not of mode
7070 "out", "in out" or access to variable.
7071 (Overrides_Synchronized_Primitive): Rename to
7072 Find_Overridden_Synchronized_Primitive.
7073 (Collect_Interface_Components): New subprogram that collects all the
7074 components of a tagged record containing tags of secondary dispatch
7075 tables.
7076 (Add_Global_Declaration): New procedure
7077 (Abstract_Interface_List): Handle properly the case of a subtype of a
7078 private extension.
7079 (Type_Access_Level): In the case of a type whose parent scope is a
7080 return statement, call Type_Access_Level recursively on the enclosing
7081 function's result type to determine the level of the return object's
7082 type.
7083 (Build_Elaboration_Entity): Build name of elaboration entity from the
7084 scope chain of the entity, rather than the unit name of the file name.
7085 (Check_Nested_Access): New procedure.
7086 (Has_Up_Level_Access, Set_Has_Up_Level_Access): New procedures.
7087 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
7088 (Get_Renamed_Entity): Utility routine for performing common operation
7089 of chasing the Renamed_Entity field of an entity.
7090
70912007-06-06 Robert Dewar <dewar@adacore.com>
7092
7093 * sem_elab.adb (Check_A_Call): Specialize elaboration warnings on
7094 elaboration model
7095 (Check_A_Call): Add check for entry call which was causing blowup
7096
70972007-06-06 Olivier Hainque <hainque@adacore.com>
7098
7099 * raise-gcc.c (__gnat_eh_personality): Tweak the signature and add
7100 special code on ia64-vms to handle major incompatibilities between the
7101 GCC unwinding ABI and the VMS Condition Handling Facility, both calling
7102 this routine with a very different set of arguments and expectations on
7103 the return value.
7104
71052007-06-06 Thomas Quinot <quinot@adacore.com>
7106
7107 * socket.c (__gnat_close_signalling_fd): New function.
7108 (__gnat_safe_gethostbyaddr, __gnat_safe_gethostbyname,
7109 __gnat_safe_getservbyname, __gnat_safe_getservbyport):
7110 New supporting functions for task safe Netdb operations.
7111
71122007-06-06 Thomas Quinot <quinot@adacore.com>
7113 Olivier Hainque <hainque@adacore.com>
7114
7115 * a-except-2005.ads, a-except-2005.adb
7116 (Raise_From_Controlled_Operation): New procedure in
7117 (private part of) Ada.Exceptions (standard runtime version). Used to
7118 provide informational exception message when Program_Error is raised as
7119 a result of an Adjust or Finalize operation propagating an exception.
7120 (Rmsg_28): Fix description for E.4(18) check.
7121 (Raise_Current_Excep): Call Debug_Raise_Exception just before
7122 propagation starts, to let debuggers know about the event in a reliable
7123 fashion.
7124 Take the address of E and dereference to make sure it is homed on stack
7125 and prevent the stores from being deleted, necessary for proper
7126 debugger behavior on "break exception" hits.
7127 (Local_Raise): Moved to System.Exceptions
7128
7129 * s-finimp.adb (Raise_From_Finalize): Code to construct an appropriate
7130 exception message from the current occurrence and raise Program_Error
7131 has been moved to Ada.Exceptions.Raise_From_Controlled_Operation.
7132
71332007-06-06 Jose Ruiz <ruiz@adacore.com>
7134 Arnaud Charlet <charlet@adacore.com>
7135
7136 * s-taprob.adb (Unlock): Change the ceiling priority of the underlying
7137 lock, if needed.
7138
7139 * s-taprop.ads (Set_Ceiling): Add this procedure to change the ceiling
7140 priority associated to a lock.
7141
7142 * s-tpoben.adb ([Vulnerable_]Complete_Task, Lock_Entries): Relax
7143 assertion to take into account case of no abort restriction.
7144 (Initialize_Protection_Entries): Add initialization for the field
7145 New_Ceiling associated to the protected object.
7146 (Unlock_Entries): Change the ceiling priority of the underlying lock, if
7147 needed.
7148
7149 * s-solita.adb (Get_Current_Excep): Moved back to s-tasini/s-tarest,
7150 since this function needs to be set consistently with Update_Exception.
7151
7152 * s-tarest.adb (Get_Current_Excep): Moved back to s-tasini/s-tarest,
7153 since this function needs to be set consistently with Update_Exception.
7154
7155 * s-taskin.ads: Update comments on
7156 Interrupt_Server_Blocked_On_Event_Flag.
7157 (Unbind_Handler): Fix handling of server_task wakeup
7158 (Server_Task): Set self's state so that Unbind_Handler can take
7159 appropriate actions.
7160 (Common_ATCB): Now use a constant from System.Parameters to determine
7161 the max size of the Task_Image field.
7162
7163 * s-tassta.adb (Task_Wrapper): Now pass the overflow guard to the
7164 Initialize_Analyzer function.
7165 ([Vulnerable_]Complete_Task, Lock_Entries): Relax assertion to
7166 take into account case of no abort restriction.
7167 ([Vulnerable_]Complete_Master): Modify assertion.
7168
7169 * s-tataat.adb (Finalize): Use the nestable versions of
7170 Defer/Undefer_Abort.
7171
7172 * s-tpobop.adb (Protected_Entry_Call): Relax assertion.
7173
7174 * s-tpobop.ads: Update comments.
7175
7176 * s-tposen.adb (Protected_Single_Entry_Call): Call Lock_Entry instead
7177 of locking the object manually, to avoid inconsistencies between
7178 Lock/Unlock_Entry assertions.
7179
7180 * s-interr.ads, s-interr.adb (Server_Task): Fix race condition when
7181 terminating
7182 application and System.Parameters.No_Abort is True.
7183 Update comments on Interrupt_Server_Blocked_On_Event_Flag.
7184 (Unbind_Handler): Fix handling of server_task wakeup
7185 (Server_Task): Set self's state so that Unbind_Handler can take
7186 appropriate actions.
7187
71882007-06-06 Thomas Quinot <quinot@adacore.com>
7189
7190 * s-finroo.ads, s-finroo.adb (Read, Write): Use null procedure
7191 declarations instead of an explicit null body, for conciseness.
7192
71932007-06-06 Robert Dewar <dewar@adacore.com>
7194
7195 * sem_eval.adb (Eval_Relational_Op): nothing to do if an operand is an
7196 illegal aggregate and the type is still Any_Composite.
7197 (Subtypes_Statically_Match): Fix problem of empty discriminant list
7198
71992007-06-06 Ed Schonberg <schonberg@adacore.com>
7200
7201 * sem_smem.adb (Check_Shared_Var): Check explicitly for as task object,
7202 to prevent subsequent expansion.
7203
72042007-06-06 Robert Dewar <dewar@adacore.com>
7205
7206 * sinput-l.ads, sinput-l.adb: implement a new pragma No_Body
7207
72082007-06-06 Ed Schonberg <schonberg@adacore.com>
7209 Robert Dewar <dewar@adacore.com>
7210
7211 * sprint.ads, sprint.adb (Sprint_Node_Actual): Output aggregate for
7212 exceptions.
7213 (Write_Itype): Handle case of string literal subtype, which
7214 comes up in this context.
7215 (Update_Itype): when debugging expanded code, update sloc of itypes
7216 associated with defining_identifiers and ranges, for gdb use.
7217 (Sprint_Node_Actual): Add static keyword to object or exception
7218 declaration output if Is_Statically_Allocated is True.
7219 (Sprint_End_Label): Set entity of end marker for a subprogram, package,
7220 or task body, so that the tree carries the proper Sloc information for
7221 debugging use.
7222 (Write_Indent): In Dump_Source_Text mode, ignore implicit label nodes
7223
72242007-06-06 Arnaud Charlet <charlet@adacore.com>
7225
7226 * s-secsta.adb (Chunk): Ensure this object has a static size known at
7227 compile time, to avoid dynamic memory allocation
7228 (Elaboration code): Only use dynamic memory allocation when needed.
7229
72302007-06-06 Quentin Ochem <ochem@adacore.com>
7231
7232 * s-stausa.ads, s-stausa.adb (Initialize_Analyzer): Added parameter
7233 "Overflow_Guard".
7234 (Stack_Analyzer): Added field "Overflow_Guard"
7235 (Task_Result): Added field "Overflow_Guard".
7236 (Index_Str): New constant.
7237 (Task_Name_Str): New constant.
7238 (Actual_Size_Str): New constant.
7239 (Pattern_Array_Element_Size): New constant.
7240 (Get_Usage_Range): New subprogram.
7241 (Output_Result): Added parameter Max_Size_Len and Max_Actual_Use_Len.
7242 Now align the output.
7243 Added comments.
7244 (Initialize): Added value for Overflow_Guard.
7245 (Fill_Stack): Use constant Pattern_Array_Elem_Size when relevant.
7246 Update the value of the overflow guard according to the actual
7247 beginning of the pattern array.
7248 (Initialize_Analyzer): Added parameter Overflow_Guard.
7249 Take this parameter into accound when computing the max size.
7250 (Compute_Result): Use constant Pattern_Array_Elem_Size when relevant.
7251 (Report_Result): Removed extra useless procedure.
7252 Updated call to Output_Result.
7253 Moved full computation of the Task_Result here.
7254
72552007-06-06 Thomas Quinot <quinot@adacore.com>
7256
7257 * g-soccon-darwin.ads, gen-soccon.c: Add new constant
7258 Thread_Blocking_IO, always True by default, set False on a per-runtime
7259 basis.
7260 Add Windows-specific constants
7261 Add new constant Need_Netdb_Buffer.
7262 Add new macros to indicate whether getXXXbyYYY is thread safe and, if
7263 not, whether to use getXXXbyYYY_r.
7264
7265 * gsocket.h: Add new constant Need_Netdb_Buffer.
7266 Add new macros to indicate whether getXXXbyYYY is thread safe and, if
7267 not, whether to use getXXXbyYYY_r.
7268
72692007-06-06 Eric Botcazou <ebotcazou@adacore.com>
7270
7271 * s-stoele.ads, s-stoele.adb: Move inline_always subprograms earlier
7272 than their first call.
7273 Add type Dummy_Communication_Block used in the generation of the pre-
7274 defined dispatching primitive _disp_asynchronous_select.
7275 (Storage_Element): Put Pragma Universal_Aliasing on it.
7276
72772007-06-06 Vincent Celier <celier@adacore.com>
7278
7279 * a-dirval-vms.adb, a-dirval.ads, a-dirval.adb (Windows): New Boolean
7280 function.
7281
7282 * a-dirval-mingw.adb (Is_Valid_Path_Name): Forbid a path with a drive
7283 letter if it is not followed by a '/' or a '\'.
7284 (Windows): New Boolean function
7285
7286 * a-direct.ads, a-direct.adb: Remove unnecessary and misplaced pragma
7287 Ada 2005.
7288 (Containing_Directory): On Windows, keep at least one '/' or '\' after a
7289 drive letter.
7290 (Containing_Directory): Raise Use_Error when the directory is a root
7291 directory.
7292 (Extension): When returning the result, use a conversion to Result_Type,
7293 not a qualification.
7294
72952007-06-06 Robert Dewar <dewar@adacore.com>
7296
7297 * stylesw.ads, stylesw.adb (Set_GNAT_Style_Check): New procedure
7298 (Set_Style_Check_Options): Recognize new -gnatyg style switch
7299
7300 * switch-c.adb (Scan_Front_End_Switches, case -gnatg): Set
7301 Warn_On_Non_Local_Exception to False, to turn off warnings for
7302 No_Exception_Propagation in ZFP runtime.
7303 (Scan_Front_End_Switches): Fix handling of --RTS switch for non GCC
7304 back-ends.
7305 (Scan_Front_End_Switches): For 'g', call Set_GNAT_Style_Checks
7306
73072007-06-06 Vincent Celier <celier@adacore.com>
7308
7309 * switch-b.adb (Scan_Binder_Switches): Add processing for new
7310 switches -R and -Z
7311
7312 * switch-m.adb (Normalize_Compiler_Switches): Do not record switch -E
7313 (Scan_Make_Switches): Recognize new switch -aP
7314
73152007-06-06 Matthew Gingell <gingell@adacore.com>
7316 Jose Ruiz <ruiz@adacore.com>
7317
7318 * s-stchop-vxworks.adb (Set_Stack_Info): Instead of trying to map the
7319 VxWorks task descriptor in the Ada run time, call a C subprogram
7320 (__gnat_get_stack_info) that extracts the required information.
7321
7322 * sysdep.c: Back out temporary lynxos workaround.
7323 (__gnat_get_stack_info): Add this procedure that passes to the Ada run
7324 time the stack information associated to the currently executing task.
7325 Only VxWorks systems require this function.
7326
73272007-06-06 Eric Botcazou <ebotcazou@adacore.com>
7328
7329 * tracebak.c (FRAME_OFFSET): Add parameter FP. On SPARC/Solaris, do not
7330 add the stack bias if the offset is computed from a frame address.
7331 (__gnat_backtrace): Adjust for above change.
7332
73332007-06-06 Thomas Quinot <quinot@adacore.com>
7334
7335 * types.h, types.ads: Rename PE_Illegal_CW_Actual_E_4_18 to
7336 PE_Non_Transportable_Actual.
7337 (By_Descriptor_Last): New constant.
7338 (By_Copy_Return): Likewise.
7339
73402007-06-06 Vincent Celier <celier@adacore.com>
7341
7342 * vms_conv.adb (Process_Argument): Keep arguments starting with '+' as
7343 is.
7344
7345 * vms_data.ads: Add entries for -gnatw.x and -gnatw.X
7346 /STYLE_CHECKS=GNAT: Change meaning to -gnatyg
7347 /GNAT_INTERNAL: New compiler qualifier corresponding to -gnatg
7348 Add missing comment for /OPTIMIZE=SPACE
7349 Add entry for OPTIMIZE=SPACE
7350 Add new qualifier /ALL_PROJECTS (= -U) for GNAT LIST
7351 Add documentation for new qualifiers corresponding to -gnatw.c/.C
7352
73532007-06-06 Vincent Celier <celier@adacore.com>
7354 Robert Dewar <dewar@adacore.com>
7355
7356 * xgnatugn.adb: Allow dots to be used in ug_words (-gnatw.c and
7357 -gnatw.C)
7358
7359 * gnat_ugn.texi: Fix ordering of -g switch for gnatmake
7360 Document gnatbind switch -a
7361 (case Constructions): Document that variables declarations are allowed
7362 for previously declared variables.
7363 Fix external lib project example
7364 -gnatg: Indicate new VMS qualifier /GNAT_INTERNAL
7365 Indicate that "#if not X or Y then" is not allowed in input files to
7366 gnatprep.
7367 Document gnatw.x and gnatw.X warning flags
7368 Mention -Winline switch to activate warnings when back-end inlining is
7369 ineffective.
7370 Add gnatcheck rule descriptions
7371 Describe how to use the GNAT driver to call a tool on a closure.
7372 Describe how to run project-wide checks or metrics.
7373 Document gnatbind's -R option
7374 Updated to account for Ada 2005 support
7375
7376 * gnat_rm.texi (Case Construction): Allow variable declarations for
7377 previously declared variables.
7378 (Representation Clauses and Pragmas): Lift restriction on alignment
7379 clauses for record types.
7380 (Ada.Characters.*): Fix typo in reference to A.3.3(27).
7381 Document No_Exception_Propagation restriction
7382 Document No_Body pragma
7383 Updated to account for Ada 2005 support; corrected some typos
7384 (Implementation Defined Pragmas): Document pragma Universal_Aliasing.
7385
7386 * gnat-style.texi: Make it clear that we never use mode IN for
7387 procedures or functions
7388
7389 * ug_words: Add entries for -gnatw.x and -gnatw.X
7390 Add entries for -gnatw.c/.C
7391
73922007-06-06 Pascal Obry <obry@adacore.com>
7393 Vincent Celier <celier@adacore.com>
7394
7395 * makegpr.adb (Add_Archive_Path): Use untouched object and library
7396 dirs and library name.
7397 (Build_Global_Archive): Idem. Minor code clean-up. Removes duplicate
7398 comments.
7399 (Build_Library): Idem.
7400 (Compile_Individual_Sources): Idem.
7401 (Compile_Link_With_Gnatmake): Idem.
7402 (Compile_Sources): Idem.
7403 (Get_Imported_Directories): Idem.
7404 (Link_Executables): Idem. Same change for the executable dir.
7405 (Check_Compilation_Needed): C_Source_Path new variable containing
7406 the canonical form of Source_Path to check against the source names
7407 in the dependency file.
7408 (Build_Global_Archive, Compile_Individual_Sources, Compile_Sources): In
7409 verbose mode, display the name of the object directory we're changing
7410 to.
7411 (Saved_Switches): New name of table X_Switches
7412 (Scan_Arg): Recognize new switch -aP and save in table Saved_Switches
7413 (Usage): New line for switch -aP
7414 (Get_Imported_Directories.Add): Make sure that Add_Arg is True before
7415 testing if a directory should be added to the search path.
7416
74172007-06-06 Javier Miranda <miranda@adacore.com>
7418
7419 * a-cidlli.ads, a-cdlili.ads, a-cohama.ads, a-coinve.ads,
7420 a-convec.ads (Empty_Vector, Empty_Map, Empty_List): Move this object
7421 declaration after freezing point of all its associated tagged types;
7422 otherwise such types are frozen too early.
7423
74242007-06-06 Robert Dewar <dewar@adacore.com>
7425
7426 * a-reatim.adb: Documentation addition
7427
7428 * g-cgideb.adb: Minor code reorganization
7429
7430 * tree_io.adb, treepr.adb, cstand.adb, krunch.adb, par.adb,
7431 mdll-utl.adb, par-ch5.adb, par-tchk.adb, s-exctab.ads, s-memory.ads,
7432 s-osprim.ads, s-restri.ads, s-soflin.ads: Minor reformatting.
7433
7434 * debug.ads, debug.adb (Get_Debug_Flag_K): Remove unused obsolete
7435 function. Change name New_Scope to Push_Scope
7436 (Get_Debug_Flag_K): Remove unused obsolete function.
7437
7438 * exp_ch8.adb, inline.adb, sem_ch8.ads: Change name New_Scope to
7439 Push_Scope.
7440
7441 * makeusg.adb: Update Copyright notice
7442 Add line for switch -aP
7443
7444 * makeusg.adb: Fix wording of some usage messages
7445
7446 * s-assert.adb (Raise_Assert_Failure): Add call to
7447 Debug_Raise_Assert_Failure.
7448
7449 * s-unstyp.ads (type Packed_Bytes2): Change alignment to use 'Min
7450 (2, Standard'Alignment) for compatibility with AAMP (where alignment
7451 is restricted to 1).
7452
7453 * s-wchjis.adb: Remove use of System.Pure_Exceptions
7454
7455 * tbuild.ads, tbuild.adb (Make_Implicit_Exception_Handler): Set the
7456 node location to No_Location when we're not debugging the expanded
7457 code.
7458
dbc30a96
AO
74592007-05-22 Alexandre Oliva <aoliva@redhat.com>
7460
7461 * misc.c (enumerate_modes): Consider log2_b to always be one.
7462
ca5ba2a3
RAE
74632007-05-14 Rafael Avila de Espindola <espindola@google.com>
7464
7465 * misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
7466
d7598e11
PO
74672007-05-02 Pascal Obry <obry@adacore.com>
7468
7469 * gnatchop.adb (Write_Source_Reference_Pragma): Change implementation
7470 to use Stream_IO.File_Type. This is needed to make use of the UTF-8
7471 encoding support of Stream_IO.
7472 (Write_Unit): Idem.
7473
7474 * adaint.h, adaint.c (__gnat_os_filename): New routine. Returns the
7475 filename and corresponding encoding to match the OS requirement.
7476 (__gnat_file_exists): Do not call __gnat_stat() on Windows as this
7477 routine will fail on specific devices like CON: AUX: ...
7478
7479 PR ada/29856: Add missing braces
7480
1be52f61
AP
74812007-04-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
7482
7483 PR ada/31660
7484 * ada-tree.h (lang_tree_node): Fix typo in chain_next.
7485
395a40e0
JH
74862007-04-21 Jan Hubicka <jh@suse.cz>
7487
7488 * misc.c (gnat_expand_body): Don't call target for destructors,
7489 avoid redundant check on syntax errors.
7490
3d95caa4
AP
74912007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
7492
7493 * ada-tree.h (lang_tree_node): Use GENERIC_NEXT
7494 instead of checking GIMPLE_STMT_P in chain_next.
7495
ea30850a
AK
74962007-04-17 Andreas Krebbel <krebbel1@de.ibm.com>
7497
7498 PR ada/31576
7499 * system-linux-alpha.ads: Disable constant condition warning for the
7500 Default_Bit_Order variable.
7501 * system-linux-s390.ads: Likewise.
7502 * system-linux-s390x.ads: Likewise.
7503 * system-linux-sparc.ads: Likewise.
7504
4b437c6b
AC
75052007-04-06 Javier Miranda <miranda@adacore.com>
7506 Matt Heaney <heaney@adacore.com>
7507 Robert Dewar <dewar@adacore.com>
7508
7509 a-coprnu.ads, a-cohata.ads, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
7510 a-cgarso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads, a-chtgke.ads,
7511 a-chtgke.ads, a-coprnu.ads, a-contai.ads, a-chtgke.ads, a-chtgke.adb,
7512 a-stwiha.ads, a-strhas.ads, a-lfztio.ads, a-liztio.ads, a-llfzti.ads,
7513 a-llizti.ads, a-sfztio.ads, a-siztio.ads, a-ssizti.ads, a-stzfix.ads,
7514 a-stzhas.ads, a-szuzha.ads, a-tiunio.ads, a-wwunio.ads, a-ztcoio.ads,
7515 a-ztinio.ads, a-zttest.ads, a-zzunio.ads, a-astaco.ads, a-charac.ads,
7516 a-chlat1.ads, ada.ads, a-dynpri.ads, a-flteio.ads, a-fwteio.ads,
7517 a-inteio.ads, a-intnam.ads, a-ioexce.ads, a-iwteio.ads, a-lfteio.ads,
7518 a-lfwtio.ads, a-liteio.ads, a-liwtio.ads, a-llftio.ads, a-llfwti.ads,
7519 a-llitio.ads, a-lliwti.ads, a-ncelfu.ads, a-ngcefu.ads, a-ngelfu.ads,
7520 a-nlcefu.ads, a-nlcoty.ads, a-nlelfu.ads, a-nllcef.ads, a-nllcty.ads,
7521 a-nllefu.ads, a-nscefu.ads, a-nscoty.ads, a-nselfu.ads, a-nucoty.ads,
7522 a-nuelfu.ads, a-numeri.ads, a-sfteio.ads, a-sfwtio.ads, a-siteio.ads,
7523 a-siwtio.ads, a-ssitio.ads, a-ssiwti.ads, a-storio.ads, a-strfix.ads,
7524 a-string.ads, a-stwifi.ads, a-titest.ads, a-unccon.ads, a-uncdea.ads,
7525 a-wtcoio.ads, a-wtinio.ads, a-wttest.ads, calendar.ads, directio.ads,
7526 i-c.ads, ioexcept.ads, machcode.ads, sequenio.ads, text_io.ads,
7527 unchconv.ads, unchdeal.ads, a-widcha.ads, a-zchara.ads, a-stboha.ads,
7528 a-stfiha.ads, a-coteio.ads, a-envvar.ads, a-lcteio.ads, a-llctio.ads,
7529 a-scteio.ads, a-swbwha.ads, a-swfwha.ads, a-szbzha.ads, a-szfzha.ads,
7530 a-tiboio.ads, a-wwboio.ads, a-zzboio.ads, a-dispat.ads, a-tgdico.ads,
7531 expander.adb, g-socket.ads, par-labl.adb, sinput-c.adb, s-tarest.ads,
7532 s-stchop.ads, g-expect-vms.adb, s-taprop-lynxos.adb,
7533 s-taprop-tru64.adb, s-taprop-irix.adb,
7534 s-taprop-hpux-dce.adb, s-traceb-hpux.adb,
7535 s-taprop-linux.adb, s-taprop-dummy.adb, s-osprim-unix.adb,
7536 s-osprim-solaris.adb, s-taprop-solaris.adb, s-taprop-vms.adb,
7537 s-osprim-mingw.adb, s-taprop-mingw.adb, s-osprim-posix.adb,
7538 s-taprop-posix.adb, a-exexpr-gcc.adb, a-ststio.adb, a-ststio.ads,
7539 a-textio.adb, a-textio.ads, a-tideau.adb, a-tideau.ads, a-witeio.adb,
7540 a-witeio.ads, a-wtdeau.adb, a-wtdeau.ads, g-calend.adb, g-calend.ads,
7541 g-dirope.adb, g-expect.ads, gnatchop.adb, g-spipat.adb, g-spipat.ads,
7542 s-direio.adb, s-direio.ads, s-fatgen.adb, s-fatgen.ads, s-parint.adb,
7543 s-sequio.adb, s-sequio.ads, s-taprop.ads, s-valdec.adb, s-valdec.ads,
7544 s-valint.adb, s-valint.ads, s-vallld.adb, s-vallld.ads, s-vallli.adb,
7545 s-vallli.ads, s-valllu.adb, s-valllu.ads, s-valrea.adb, s-valrea.ads,
7546 s-valuns.adb, s-valuns.ads, s-valuti.adb, s-valuti.ads, xref_lib.adb,
7547 s-stchop.adb, i-vxwork-x86.ads, a-crbtgo.ads, a-crbtgo.adb,
7548 a-coorse.ads, a-coorse.adb, a-cohama.ads, a-cohama.adb, a-ciorse.ads,
7549 a-ciorse.adb, a-cihama.ads, a-cihama.adb, a-chtgop.ads, a-chtgop.ads,
7550 a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cihase.ads, a-cohase.adb,
7551 a-cohase.ads, a-swuwha.ads, a-ciormu.ads, a-coormu.ads, a-rbtgso.ads,
7552 a-stunha.ads, a-ciorma.adb, a-coorma.adb, a-ztdeau.adb, a-ztdeau.ads,
7553 a-ztexio.adb, a-ztexio.ads: Addition of null-exclusion to anonymous
7554 access types.
7555 Update documentation.
7556 Minor rewording.
7557
75582007-04-06 Robert Dewar <dewar@adacore.com>
7559
7560 * system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
7561 system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
7562 system-vxworks-sparcv9.ads, system-solaris-x86.ads, system-irix-o32.ads,
7563 system-irix-n32.ads, system-hpux.ads, system-vxworks-m68k.ads,
7564 system-linux-x86.ads, system-vxworks-mips.ads, system-interix.ads,
7565 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
7566 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
7567 system-vxworks-alpha.ads, system-vms_64.ads, system-darwin-ppc.ads,
7568 system-vxworks-x86.ads, system-linux-ppc.ads, system-linux-hppa.ads,
7569 system-hpux-ia64.ads, targparm.adb,
7570 targparm.ads (Functions_Return_By_DSP_On_Target): Removed
7571
7572 * system.ads: Move Functions_Return_By_DSP to obsolete section,
7573 kept for bootstrap purposes only.
7574
75752007-04-06 Arnaud Charlet <charlet@adacore.com>
7576
7577 * s-osinte-lynxos-3.ads, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
7578 s-osinte-freebsd.ads, s-osinte-aix.ads, s-osinte-darwin.ads,
7579 s-taprop-posix.adb (Create_Task): Fix handling of Task_Info.
7580 (PTHREAD_SCOPE_PROCESS, PTHREAD_SCOPE_SYSTEM): New constants.
7581
75822007-04-06 Robert Dewar <dewar@adacore.com>
7583
7584 * a-except.adb, a-except.ads, a-except-2005.ads, a-except-2005.adb
7585 (Local_Raise): New dummy procedure called when a raise is converted
7586 to a local goto. Used for debugger to detect that the exception
7587 is raised.
7588
7589 * debug.adb: Document new d.g flag (expand local raise statements to
7590 gotos even if pragma Restriction (No_Exception_Propagation) is not set)
7591
7592 * exp_sel.adb: Use Make_Implicit_Exception_Handler
7593
7594 * exp_ch11.adb (Expand_Exception_Handlers): Use new flag -gnatw.x to
7595 suppress warnings for unused handlers.
7596 (Warn_If_No_Propagation): Use new flag -gnatw.x to suppress
7597 warnings for raise statements not handled locally.
7598 (Get_RT_Exception_Entity): New function
7599 (Get_Local_Call_Entity): New function
7600 (Find_Local_Handler): New function
7601 (Warn_If_No_Propagation): New procedure
7602 (Expand_At_End_Handler): Call Make_Implicit_Handler
7603 (Expand_Exception_Handlers): Major additions to deal with local handlers
7604 (Expand_N_Raise_Constraint_Error, Expand_N_Raise_Program_Error,
7605 Expand_N_Raise_Storage_Error, (Expand_N_Raise_Statement): Add handling
7606 for local raise
7607
7608 * exp_ch11.ads (Get_RT_Exception_Entity): New function
7609 (Get_Local_Call_Entity): New function
7610
7611 * gnatbind.adb (Restriction_List): Add No_Exception_Propagation to list
7612 of restrictions that the binder will never suggest adding.
7613
7614 * par-ch11.adb (P_Exception_Handler): Set Local_Raise_Statements field
7615 to No_Elist.
7616
7617 * restrict.adb (Check_Restricted_Unit): GNAT.Current_Exception may not
7618 be with'ed in the presence of pragma Restriction
7619 (No_Exception_Propagation).
7620
7621 * sem.adb (Analyze): Add entries for N_Push and N_Pop nodes
7622
7623 * sem_ch11.adb (Analyze_Exception_Handler): If there is a choice
7624 parameter, then the handler is not a suitable target for a local raise,
7625 and this is a violation of restriction No_Exception_Propagation.
7626 (Analyze_Handled_Statements): Analyze choice parameters in exception
7627 handlers before analyzing statement sequence (needed for proper
7628 detection of local raise statements).
7629 (Analyze_Raise_Statement): Reraise statement is a violation of the
7630 No_Exception_Propagation restriction.
7631
7632 * s-rident.ads: Add new restriction No_Exception_Propagation
7633
7634 * tbuild.ads, tbuild.adb (Make_Implicit_Exception_Handler): New
7635 function, like Make_Exception_Handler but sets Local_Raise_Statements
7636 to No_List.
7637 (Add_Unique_Serial_Number): Deal with case where this is called during
7638 processing of configuration pragmas.
7639
76402007-04-06 Thomas Quinot <quinot@adacore.com>
7641 Pat Rogers <rogers@adacore.com>
7642 Pascal Obry <obry@adacore.com>
7643
7644 * g-stsifd-sockets.adb: New file.
7645
7646 * g-socthi.ads, g-socket.adb, g-socthi-vxworks.adb,
7647 g-socthi-vxworks.ads, g-socthi-mingw.ads, g-socthi-vms.ads,
7648 g-socthi-vms.adb: Move signalling
7649 fd management to a nested package, so that they can conveniently be
7650 moved to a subunit that is shared across Windows, VMS, and VxWorks
7651 (Ada implementation) or completed with imported bodies from socket.c
7652 (UNIX case).
7653 (Read_Signalling_Fd, Write_Signalling_Fd, Create_Signalling_Fds): New
7654 subprograms.
7655 (Check_Selector): Use Read_Signalling_Fd to read and discard data from
7656 the signalling file descriptor.
7657 (Abort_Selector): Use Write_Signalling_Fd to write dummy data to the
7658 signalling file descriptor.
7659 (Create_Selector): Use new C-imported subprogram Create_Signalling_Fds
7660 instead of creating a pair of sockets for signalling here.
7661
7662 * g-socthi.adb: Ditto.
7663 Set the runtime process to ignore SIGPIPEs on platforms that support
7664 neither SO_NOSIGPIPE nor MSG_NOSIGNAL functionality.
7665
7666 * g-socthi-mingw.adb: Ditto.
7667 (WS_Version): Use Windows 2.2.
7668 Use Winsock 2.2 (instead of 1.1) for the GNAT.Socket API.
7669
7670 * g-soliop-mingw.ads: Link with ws2_32 for Windows 2.x support.
7671 Use Winsock 2.2 (instead of 1.1) for the GNAT.Socket API.
7672
7673 * Makefile.in: New libgnat pair g-stsifd.adb<g-stsifd-sockets.adb.
7674 added GNAT byte swapping facility
7675 Update FreeBSD THREADSLIB from -lc_r to -lpthread, for FreeBSD 6.
7676
7677 * g-bytswa.adb, g-bytswa-x86.adb, g-bytswa.ads: New files.
7678
7679 * socket.c (__gnat_read_signalling_fd, __gnat_write_controlling_fd):
7680 New subprograms.
7681 (__gnat_create_signalling_fds): New subprogram.
7682 Set the runtime process to ignore SIGPIPEs on platforms that support
7683 neither SO_NOSIGPIPE nor MSG_NOSIGNAL functionality.
7684
76852007-04-06 Hristian Kirtchev <kirtchev@adacore.com>
7686 Vincent Celier <celier@adacore.com>
7687
7688 * a-calend-vms.ads, a-calend.ads, a-calend.adb, a-calend-vms.adb:
7689 New version of Ada.Calendar which supports the new upper bound of Ada
7690 time (2399-12-31 86_399.999999999).
7691 The following modifications have been made to the package:
7692 - New representation of time as count of nanoseconds since the start of
7693 Ada time (1901-1-1 0.0).
7694 - Target independent Split and Time_Of routines which service both
7695 Ada 95 and Ada 2005 code.
7696 - Target independent interface to the Ada 2005 children of Calendar.
7697 - Integrated leap seconds into Ada 95 and Ada 2005 mode.
7698 - Handling of non-leap centenial years.
7699 - Updated clock function.
7700 - Updated arithmetic and comparison operators.
7701
7702 * a-caldel.adb (To_Duration): Add call to target independent routine in
7703 Ada.Calendar to handle the conversion of time to duration.
7704
7705 * sysdep.c (__gnat_localtime_tzoff): Test timezone before setting off
7706 (UTC Offset).
7707 If timezone is obviously incorrect (outside of -14 hours .. 14 hours),
7708 set off to 0.
7709 (__gnat_localtime_tzoff for Lynx and VxWorks): Even though these
7710 targets do not have a natural time zone, GMT is used as a default.
7711 (__gnat_get_task_options): New.
7712
7713 * a-direct.adb (Modification_Time): Add with and use clauses for
7714 Ada.Calendar and Ada.
7715 Calendar.Formatting. Remove with clause for Ada.Unchecked_Conversion
7716 since it is no longer needed.
7717 (Duration_To_Time): Removed.
7718 (OS_Time_To_Long_Integer): Removed.
7719 (Modification_Time): Rewritten to use Ada.Calendar and Ada.Calendar.
7720 Formatting Time_Of routines which automatically handle time zones,
7721 buffer periods and leap seconds.
7722
7723 * a-calari.ads, a-calari.adb ("+", "-", Difference): Add calls to
7724 target independent routines in Ada.Calendar.
7725
7726 * a-calfor.ads, a-calfor.adb:
7727 Code cleanup and addition of validity checks in various routines.
7728 (Day_Of_Week, Split, Time_Of): Add call to target independent routine in
7729 Ada.Calendar.
7730
7731 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): Add call to target
7732 independent routine in Ada.Calendar.
7733
77342007-04-06 Olivier Hainque <hainque@adacore.com>
7735
7736 * adaint.c:
7737 (convert_addresses): Adjust prototype and dummy definition to expect an
7738 extra file_name argument.
7739
7740 * gmem.c (__gnat_convert_addresses): Wrapper to convert_addresses,
7741 filling the now expected file_name argument with the appropriate
7742 argv[0] expansion.
7743 (__gnat_gmem_a2l_initialize, __gnat_gmem_read_next_frame): Use it.
7744 (tracebk): Array of void * instead of char *, corresponding to what
7745 convert_addresses expects.
7746 (exename): New static global, to hold the executable file name to be
7747 used in all convert_addresses invocations.
7748 (gmem_read_backtrace, __gnat_gmem_symbolic): Account for tracebk type
7749 change.
7750 (__gnat_gmem_a2l_initialize): Resolve exename.
7751 (__gnat_convert_addresses): Use exename as the convert_addresses
7752 file_name argument.
7753
7754 * g-trasym.adb (Symbolic_Traceback): Adjust signature of imported
7755 "convert_addresses", now expecting a filename argument. Import the
7756 necessary entities to compute the filename to use and pass it to
7757 convert_addresses.
7758
77592007-04-06 Matt Gingell <gingell@adacore.com>
7760
7761 * system-aix.ads: Back out previous change.
7762 (Functions_Return_By_DSP): Removed
7763
77642007-04-06 Pascal Obry <obry@adacore.com>
7765
7766 * s-osprim-mingw.adb (Timed_Delay): Use the right clock (standard one
7767 or the monotonic used by Ada.Real_Time) to compute the sleep duration
7768 on Windows.
7769
77702007-04-06 Jose Ruiz <ruiz@adacore.com>
7771
7772 * s-osinte-vxworks.ads, s-osinte-vxworks.adb (VX_FP_TASK): Remove this
7773 function. Its value changes in different VxWorks versions, and it is
7774 now handled by the function __gnat_get_task_options.
7775
7776 * s-taprop-vxworks.adb (Create_Task): Call the function
7777 __gnat_get_task_options to get the required options for creating a task.
7778
77792007-04-06 Pascal Obry <obry@adacore.com>
7780 Thomas Quinot <quinot@adacore.com>
7781
7782 * adaint.c: Replace all occurences of S2WS to S2WSU (Unicode) when
7783 dealing with filename.
7784 (__gnat_fopen): Call the proper macro (8bits or UTF8) to convert the
7785 filename from a standard string to a wide-string depending on the
7786 encoding value.
7787 (__gnat_freopen): Idem.
7788 (__gnat_current_time): New function (wrapper for time(3) standard C
7789 function).
7790
7791 * g-os_lib.ads (Current_Time): New function. Returns the current
7792 system time as an OS_Time value.
7793
7794 * s-osprim.ads (Clock): Add more precise definition of UNIX epoch.
7795 (Monotonic_Clock): Same.
7796
77972007-04-06 Quentin Ochem <ochem@adacore.com>
7798
7799 * ali.ads, ali.adb (Get_Nat): Raise an exception if the file cursor is
7800 not on a natural.
7801 (Scan_ALI): Cancel the xref line if there has been a reading ALI error.
7802
78032007-04-06 Jose Ruiz <ruiz@adacore.com>
7804
7805 * a-retide.adb: Add elaboration code to ensure that the tasking run
7806 time is initialized when using delay operations even when no task is
7807 created.
7808
78092007-04-06 Javier Miranda <miranda@adacore.com>
7810
7811 * a-tags.ads, a-tags.adb (Object_Specific_Data): Remove
7812 component Num_Prim_Ops.
7813 (Set_Num_Prim_Ops): Removed.
7814 Remove all the assertions because all the routines of this
7815 package are inline always.
7816 (Get_Offset_Index): Add support to primary dispatch tables.
7817 Move the documentation about the dispatch table to a-tags.ads
7818 (Set_External_Tag): Removed
7819 (Inherit_TSD): Removed.
7820 (Interface_Data_Element, Interfaces_Array, Interface_Data): Declarations
7821 moved to a-tags.ads
7822 (Displace, IW_Membership, Inherit_TSD, Interface_Ancestor_Tags,
7823 Register_Interface_Tag, Set_Offset_To_Top): Update all the occurrences
7824 of the TSD field "Table" because this field has been renamed to
7825 "Ifaces_Table".
7826 (Inherit_CPP_DT): Removed.
7827 (K_Typeinfo, K_Offset_To_Top, K_Tagged_Kind, K_Signature,
7828 Cstring, Tag_Table, Type_Specific_Data, Dispatch_Table): These
7829 declarations have been moved to a-tags.ads
7830 (Check_Size): Removed.
7831 (Expanded_Name): Updated to get access to the new field of TSD
7832 containing the address of the expanded name.
7833 (Get_Access_Level/Set_Access_Level): Removed.
7834 (Get_Predefined_Prim_Op_Address): Removed.
7835 (Set_Predefined_Prim_Op_Address): Removed.
7836 (Get_Prim_Op_Address/Set_Prim_Op_Address): Removed.
7837 (Get_Remotely_Callable/Set_Remotely_Callable): Removed.
7838 (Set_Expanded_Name): Removed.
7839 (Inherit_DT): Removed.
7840 (Inherit_CPP_DT): Removed.
7841 (Set_RC_Offset): Removed.
7842 (Set_TSD): Removed.
7843 (Base_Address): New function that displaces "this" to point to the base
7844 of the object (that is, to point to the primary tag of the object).
7845
78462007-04-06 Ed Schonberg <schonberg@adacore.com>
7847 Javier Miranda <miranda@adacore.com>
7848
7849 * exp_ch3.ads, exp_ch3.adb (Analyze_N_Full_Type_Declaration): For an
7850 anonymous access component, do not create a master_id if type already
7851 has one, as may happen if the type is a subcomponent of a packed array
7852 type.
7853 (Build_Init_Procedure, Component_Needs_Simple_Initialization,
7854 Initialize_Tag): Remove code associated with the old CPP pragmas.
7855 CPP_Virtual and CPP_Vtable are no longer supported.
7856 (Build_Offset_To_Top_Internal): Add support for concurrent record types
7857 (Build_Offset_To_Top_Functions): Add support for concurrent record types
7858 (Freeze_Record_Type): Remove call to
7859 Init_Predefined_Interface_Primitives.
7860 (Init_Secondary_Tags.Initialize_Tag): New subprogram containing all the
7861 code required to initialize the tags of the secondary dispatch tables.
7862 This leaves the algoritm more clear.
7863 (Init_Secondary_Tags): Add support for concurrent record types
7864 (Make_Predefined_Primitive_Specs): Code cleanup.
7865 (Predefined_Primitive_Bodies): Code cleanup.
7866 (Build_Master_Renaming): New local subprogram.
7867 (Expand_N_Full_Type_Declaration): Build the master_id associated with
7868 anonymous access to task type components.
7869 (Expand_N_Subtype_Indication): The bounds of a range constraint in a
7870 subtype indication are resolved during analysis, and must not be done
7871 here.
7872 (Stream_Operation_OK): Check Restriction_Active before RTE_Available.
7873
78742007-04-06 Geert Bosch <bosch@adacore.com>
7875 Ed Schonberg <schonberg@adacore.com>
7876 Javier Miranda <miranda@adacore.com>
7877 Bob Duff <duff@adacore.com>
7878
7879 * exp_ch4.adb (Expand_N_Type_Conversion): Remove special processing
7880 for conversion of a Float_Type'Truncation to integer.
7881
7882 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): New function to
7883 check if a node is an attribute that can be handled directly by the
7884 back end.
7885 (Expand_N_Attribute_Reference): Suppress expansion of floating-point
7886 attributes that can be handled directly by the back end.
7887 (Expand_N_Attribute_Reference, case 'Access and 'Unchecked_Access):
7888 use new predicate Is_Access_Protected_Subprogram_Type.
7889 (Expand_N_Attribute_Reference, case 'Write): The reference is legal for
7890 and Unchecked_Union if it is generated as part of the default Output
7891 procedure for a type with default discriminants.
7892 (Expand_N_Attribute_Reference): Avoid the expansion of dispatching calls
7893 if we are compiling under restriction No_Dispatching_Calls.
7894 (Constrained): Use Underlying_Type, in case the type is private without
7895 discriminants, but the full type has discriminants.
7896 (Expand_N_Attribute_Reference): Replace call to Get_Access_Level by
7897 call to Build_Get_Access_Level.
7898 (Expand_N_Attribute_Reference): The use of 'Address with class-wide
7899 interface objects requires a call to the run-time subprogram that
7900 returns the base address of the object.
7901 (Valid_Conversion): Improve error message on illegal attempt to store
7902 an anonymous access to subprogram value into a record component.
7903
7904 * sem_res.adb (Resolve_Equality_Op): Detect ambiguity for "X'Access =
7905 null".
7906 (Simplify_Type_Conversion): New procedure that performs simplification
7907 of Int_Type (Float_Type'Truncation (X)).
7908 (Resolve_Type_Conversion): Call above procedure after resolving operand
7909 and before performing checks. This replaces the existing ineffective
7910 code in Exp_Ch4.
7911 (Set_String_Literal_Subtype): When creating the internal static lower
7912 bound subtype for a string literal, use a newly created copy of the
7913 subtree representing the lower bound.
7914 (Resolve_Call): Exclude build-in-place function calls from transient
7915 scope treatment. Update comments to describe this exception.
7916 (Resolve_Equality_Op): In case of dispatching call check violation of
7917 restriction No_Dispatching_Calls.
7918 (Resolve_Call): If the call returns an array, the context imposes the
7919 component type of the array, and the function has one non-defaulted
7920 parameter, rewrite the call as the indexing of a call with a single
7921 parameter, to handle an Ada 2005 syntactic ambiguity for calls written
7922 in prefix form.
7923 (Resolve_Actuals): If an actual is an allocator for an access parameter,
7924 the master of the created object is the innermost enclosing statement.
7925 (Remove_Conversions): For a binary operator, check if type of second
7926 formal is numeric, to check if an abstract interpretation is present
7927 in the case of exponentiation as well.
7928
79292007-04-06 Ed Schonberg <schonberg@adacore.com>
7930 Bob Duff <duff@adacore.com>
7931
7932 * atree.h, atree.ads, atree.adb (Copy_Node_With_Replacement): When
7933 copying a parameter list in a call, set properly the First_Named_Formal
7934 and Next_Named_Formal fields in the new list and in the enclosing call.
7935 (Watch_Node,New_Node_Breakpoint,New_Node_Debugging_Output): Shorten
7936 names, to ease typing in the debugger. Improve comments.
7937 (Watch_Node): New variable, intended to be set in the debugger.
7938 (New_Node_Breakpoint): New do-nothing procedure to set a breakpoint on,
7939 called when the watched node is created.
7940 (New_Node_Debugging_Output): Combined version of local procedures
7941 New_Node_Debugging_Output and New_Entity_Debugging_Output, now global,
7942 with a parameter so that conditional breakpoints like "if Node = 12345"
7943 work.
7944 (New_Node, New_Entity): Call the global New_Node_Debugging_Output.
7945 Add Elist1 function
7946
79472007-04-06 Thomas Quinot <quinot@adacore.com>
7948 Ed Schonberg <schonberg@adacore.com>
7949 Gary Dismukes <dismukes@adacore.com>
7950
7951 * checks.ads, checks.adb (Selected_Range_Checks): No range check is
7952 required for a conversion between two access-to-unconstrained-array
7953 types.
7954 (Expr_Known_Valid): Validity checks do not apply to discriminants, but
7955 to discriminant constraints on discriminant objects. This rule must
7956 apply as well to discriminants of protected types in private components.
7957 (Null_Exclusion_Static_Checks): If No_Initialization is set on an
7958 object of a null-excluding access type then don't require the
7959 the object declaration to have an expression and don't emit a
7960 run-time check.
7961
79622007-04-06 Arnaud Charlet <charlet@adacore.com>
7963 Eric Botcazou <botcazou@adacore.com>
7964
7965 * gnatvsn.ads, comperr.adb (Get_Gnat_build_Type): Renamed Build_Type
7966 and made constant.
7967
7968 * comperr.ads, comperr.adb (Compiler_Abort): Add third parameter
7969 Fallback_Loc. Use it as the sloc info when Current_Error_Node doesn't
7970 carry any.
7971
7972 * fe.h (Compiler_Abort): Add third parameter.
7973
7974 * misc.c (internal_error_function): Build third argument from current
7975 input location and pass it to Compiler_Abort.
7976
79772007-04-06 Gary Dismukes <dismukes@adacore.com>
7978
7979 * cstand.adb (Create_Standard): When the target's storage unit size is
7980 greater than a byte, set Has_Non_Standard_Rep and Has_Pragma_Pack on
7981 Standard_String.
7982
79832007-04-06 Nicolas Roche <roche@adacore.com>
7984
7985 * cstreams.c (__gnat_full_name): Fix issues on VxWorks 6.x for which
7986 absolute path can have the following form: device:/a/b. In this case
7987 '/' should be inserted between the path and the filename.
7988
79892007-04-06 Olivier Hainque <hainque@adacore.com>
7990 Eric Botcazou <botcazou@adacore.com>
7991
7992 * decl.c (gnat_to_gnu_entity) <E_Constant>: Associate an external
7993 VAR_DECL to a CONST_DECL we make for a public constant when we know the
7994 corresponding definition has created the so made visible variable.
7995 Handle anonymous access to protected subprogram.
7996 (gnat_to_gnu_entity) <E_Variable>: Do not make the underlying type of an
7997 object with an address clause volatile. Re-enable original fix.
7998 <E_Subprogram_Type>: Set TYPE_REF_CAN_ALIAS_ALL on the reference type
7999 too.
8000 (gnat_to_gnu_entity) <E_Class_Wide_Type>: Retrieve the TYPE_DECL
8001 associated with either the Equivalent or Root type, instead of the
8002 naked type node.
8003 (gnat_to_gnu_entity): Manually mark the top of the DECL_FIELD_OFFSET
8004 subtree for every field of a global record type.
8005 (gnat_to_gnu_entity) <E_Record_Subtype>: If the subtype has
8006 discriminants, invoke again variable_size on its newly computed sizes.
8007
80082007-04-06 Robert Dewar <dewar@adacore.com>
8009 Thomas Quinot <quinot@adacore.com>
8010 Ed Schonberg <schonberg@adacore.com>
8011 Bob Duff <duff@adacore.com>
8012
8013 * einfo.ads, einfo.adb: (First_Component_Or_Discriminant): New function
8014 (Next_Component_Or_Discriminant): New function and procedure
8015 (First_Index, First_Literal, Master_Id,
8016 Set_First_Index, Set_First_Literal, Set_Master_Id):
8017 Add missing Ekind assertions.
8018 (Is_Access_Protected_Subprogram_Type): New predicate.
8019 (Has_RACW): New entity flag, set on package entities to indicate that
8020 the package contains the declaration of a remote accecss-to-classwide
8021 type.
8022 (E_Return_Statement): This node type has the Finalization_Chain_Entity
8023 attribute, in case the result type has controlled parts.
8024 (Requires_Overriding): Add this new flag, because "requires
8025 overriding" is subtly different from "is abstract" (see AI-228).
8026 (Is_Abstract): Split Is_Abstract flag into Is_Abstract_Subprogram and
8027 Is_Abstract_Type. Make sure these are called only when appropriate.
8028 (Has_Pragma_Unreferenced_Objects): New flag
8029
8030 * exp_ch5.adb (Expand_N_Assignment_Statement): If the left-hand side is
8031 class-wide, the tag of the right-hand side must be an exact match, not
8032 an ancestor of that of the object on left-hand side.
8033 (Move_Activation_Chain): New procedure to create the call to
8034 System.Tasking.Stages.Move_Activation_Chain.
8035 (Expand_N_Extended_Return_Statement): Generate code to call
8036 System.Finalization_Implementation.Move_Final_List at the end of a
8037 return statement if the function's result type has controlled parts.
8038 Move asserts to Build_In_Place_Formal.
8039 (Move_Final_List): New function to create the call statement.
8040 (Expand_N_Assignment_Statement): In case of assignment to a class-wide
8041 tagged type, replace generation of call to the run-time subprogram
8042 CW_Membership by call to Build_CW_Membership.
8043 (Expand_N_Return_Statement): Replace generation of call to the run-time
8044 subprogram Get_Access_Level by call to Build_Get_Access_Level.
8045 (Expand_N_Simple_Function_Return): Replace generation of call to the
8046 run-time subprogram Get_Access_Level by call to Build_Get_Access_Level.
8047
8048 * exp_ch6.ads, exp_ch6.adb (Expand_Call): Use new predicate
8049 Is_Access_Protected_Subprogram_Type, to handle both named and anonymous
8050 access to protected operations.
8051 (Add_Task_Actuals_To_Build_In_Place_Call): New procedure to add the
8052 master and chain actual parameters to a build-in-place function call
8053 involving tasks.
8054 (BIP_Formal_Suffix): Add new enumeration literals to complete the case
8055 statement.
8056 (Make_Build_In_Place_Call_In_Allocator,
8057 Make_Build_In_Place_Call_In_Anonymous_Context,
8058 Make_Build_In_Place_Call_In_Assignment,
8059 Make_Build_In_Place_Call_In_Object_Declaration): Call
8060 Add_Task_Actuals_To_Build_In_Place_Call with the appropriate master.
8061 (Expand_Inlined_Call): If the subprogram is a null procedure, or a
8062 stubbed procedure with a null body, replace the call with a null
8063 statement without using the full inlining machinery, for efficiency
8064 and to avoid invalid values in source file table entries.
8065
8066 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Add support for
8067 renamings of calls to build-in-place functions.
8068
8069 * rtsfind.adb (RTE_Record_Component_Available): New subprogram that
8070 provides the functionality of RTE_Available to record components.
8071 (RTU_Entity): The function Entity has been renamed to RTU_Entity
8072 to avoid undesired overloading.
8073 (Entity): New subprogram that returns the entity for the referened
8074 unit. If this unit has not been loaded, it returns Empty.
8075 (RE_Activation_Chain_Access, RE_Move_Activation_Chain): New entities.
8076 Remove no longer used entities.
8077 (RE_Finalizable_Ptr_Ptr, RE_Move_Final_List): New entities.
8078 (RE_Type_Specific_Data): New entity.
8079 (RE_Move_Any_Value): New entity.
8080 (RE_TA_A, RE_Get_Any_Type): New entities.
8081 (RE_Access_Level, RE_Dispatch_Table, E_Default_Prim_Op_Count,
8082 RE_Prims_Ptr, RE_RC_Offset, RE_Remotely_Callable,
8083 RE_DT_Typeinfo_Ptr_Size, RE_Cstring_Ptr, RE_DT_Expanded_Name): Added.
8084 (Entity): New subprogram that returns the entity for the referened
8085 unit. If this unit has not been loaded, it returns Empty.
8086 (RTE): Addition of a new formal that extends the search to the scopes
8087 of the record types found in the chain of the package.
8088
8089 * sem_ch6.ads, sem_ch6.adb (Check_Overriding_Indicator): Print
8090 "abstract subprograms must be visible" message, whether or not the type
8091 is an interface; that is, remove the special case for interface types.
8092 (Analyze_Function_Return): Remove error message "return of task objects
8093 is not yet implemented" because this is now implemented.
8094 (Create_Extra_Formals): Add the extra master and activation chain
8095 formals in case the result type has tasks.
8096 Remove error message "return of limited controlled objects is not yet
8097 implemented".
8098 (Create_Extra_Formals): Add the extra caller's finalization list formal
8099 in case the result type has controlled parts.
8100 (Process_Formals): In case of access formal types there is no need
8101 to continue with the analysis of the formals if we already notified
8102 errors.
8103 (Check_Overriding_Indicator): Add code to check overriding of predefined
8104 operators.
8105 (Create_Extra_Formals): Prevent creation of useless Extra_Constrained
8106 flags for formals that do not require them,.
8107 (Enter_Overloaded_Entity): Do not give -gnatwh warning message unless
8108 hidden entity is use visible or directly visible.
8109 (Analyze_Abstract_Subprogram_Declaration,Analyze_Subprogram_Body,
8110 Analyze_Subprogram_Declaration,Analyze_Subprogram_Specification,
8111 Check_Conventions,Check_Delayed_Subprogram,Make_Inequality_Operator,
8112 New_Overloaded_Entity): Split Is_Abstract flag into
8113 Is_Abstract_Subprogram and Is_Abstract_Type.
8114
8115 * s-finimp.ads, s-finimp.adb (Move_Final_List): New procedure to move
8116 a return statement's finalization list to the caller's list, used for
8117 build-in-place functions with result type with controlled parts.
8118 Remove no longer used entities.
8119
8120 * s-taskin.ads (Activation_Chain): Remove pragma Volatile. It is no
8121 longer needed, because the full type is now limited, and therefore a
8122 pass-by-reference type.
8123 (Foreign_Task_Level): New constant.
8124
8125 * s-tassta.ads, s-tassta.adb (Move_Activation_Chain): New procedure to
8126 move tasks from the activation chain belonging to a return statement to
8127 the one passed in by the caller, and update the master to the one
8128 passed in by the caller.
8129 (Vulnerable_Complete_Master, Check_Unactivated_Tasks): Check the master
8130 of unactivated tasks, so we don't kill the ones that are being returned
8131 by a build-in-place function.
8132 (Create_Task): Ignore AI-280 for foreign threads.
8133
81342007-04-06 Ed Schonberg <schonberg@adacore.com>
8135 Robert Dewar <dewar@adacore.com>
8136 Bob Duff <duff@adacore.com>
8137 Gary Dismukes <dismukes@adacore.com>
8138
8139 * errout.adb (Unwind_Internal_Type): Use predicate
8140 Is_Access__Protected_Subprogram_Type.
8141
8142 * freeze.adb (Size_Known): Use First/Next_Component_Or_Discriminant
8143 (Freeze_Entity, packed array case): Do not override explicitly set
8144 alignment and size clauses.
8145 (Freeze_Entity): An entity declared in an outer scope can be frozen if
8146 the enclosing subprogram is a child unit body that acts as a spec.
8147 (Freeze_Entity): Use new predicate Is_Access_Protected_Subprogram_Type.
8148 (Freeze_Record_Type): New Ada 2005 processing for reverse bit order
8149 Remove all code for DSP option
8150
8151 * layout.adb (Layout_Record_Type): Use First/
8152 Next_Component_Or_Discriminant
8153 (Layout_Type): Use new predicate Is_Access_Protected_Subprogram_Type,
8154 to handle properly the anonymous access case.
8155
8156 * sem_attr.adb (Build_Access_Object_Type): Use E_Access_Attribute_Type
8157 for all access attributes, because overload resolution should work the
8158 same for 'Access, 'Unchecked_Access, and 'Unrestricted_Access. This
8159 causes the error message for the ambiguous "X'Access = Y'Access" and
8160 "X'Unrestricted_Access = Y'Access" and so forth to match.
8161 (Resolve_Attribute, case 'Access): Remove use of Original_Access_Type,
8162 now that anonymous access to protected operations have their own kind.
8163 (Resolve_Attribute): In case of dispatching call check the violation of
8164 restriction No_Dispatching_Calls.
8165 (Check_Array_Type): Check new -gnatyA array index style option
8166
8167 * sem_ch3.ads, sem_ch3.adb (Derived_Type_Declaration): Reject an
8168 attempt to derive from a synchronized tagged type.
8169 (Analyze_Type_Declaration): If there is a incomplete tagged view of the
8170 type, inherit the class-wide type already created, because it may
8171 already have been used in a self-referential anonymous access component.
8172 (Mentions_T): Recognize self-referential anonymous access components
8173 that use (a subtype of) the class-wide type of the enclosing type.
8174 (Build_Derived_Record_Type): Add earlier setting of Is_Tagged_Type. Pass
8175 Derived_Type for Prev formal on call to
8176 Check_Anonymous_Access_Components rather than Empty.
8177 (Make_Incomplete_Type_Declaration): Add test for case where the type has
8178 a record extension in deciding whether to create a class-wide type,
8179 rather than just checking Tagged_Present.
8180 (Replace_Anonymous_Access_To_Protected_Subprogram): Procedure applies
8181 to stand-alone object declarations as well as component declarations.
8182 (Array_Type_Declaration): Initialize Packed_Array_Type to Empty, to
8183 prevent accidental overwriting when enclosing package appears in
8184 a limited_with_clause.
8185 (Array_Type_Declaration): If the component type is an anonymous access,
8186 the associated_node for the itype is the type declaration itself.
8187 (Add_Interface_Tag_Components): Modified to support concurrent
8188 types with abstract interfaces.
8189 (Check_Abstract_Interfaces): New subprogram that verifies the ARM
8190 rules 3.9.4 (15/2), 9.1 (9.d/2) and 9.4 (11.d/2).
8191 (Build_Derived_Record_Type): Add call to Analyze_Interface_Declaration
8192 to complete the decoration of synchronized interface types. Add also
8193 a call to Check_Abstract_Interfaces to verify the ARM rules.
8194 (Derive_Interface_Subprograms): Modified to support concurrent types
8195 with abstract interfaces.
8196 (Analyze_Subtype_Indication): Resolve the range with the given subtype
8197 mark, rather than delaying the full resolution depending on context.
8198 (Analyze_Component_Declaration,Analyze_Interface_Declaration,
8199 Analyze_Object_Declaration,Analyze_Subtype_Declaration,
8200 Array_Type_Declaration,Build_Derived_Record_Type,
8201 Build_Discriminated_Subtype,Check_Abstract_Overriding,Check_Completion,
8202 Derive_Interface_Subprograms,Derive_Subprogram,Make_Class_Wide_Type,
8203 Process_Full_View,Record_Type_Declaration): Split Is_Abstract flag into
8204 Is_Abstract_Subprogram and Is_Abstract_Type. Make sure these are
8205 called only when appropriate.
8206 (Copy_And_Swap): Copy Has_Unreferenced_Objects flag from full type
8207 to private type.
8208 (Analyze_Subtype_Declaration): For an access subtype declaration, create
8209 an itype reference for the anonymous designated subtype, to prevent
8210 scope anonmalies in gigi.
8211 (Build_Itype_Reference): New utility, to simplify construction of such
8212 references.
8213
82142007-04-06 Vincent Celier <celier@adacore.com>
8215
8216 * errutil.adb (Initialize): Initialize warnings table, if all warnings
8217 are suppressed, supply an initial dummy entry covering all possible
8218 source locations.
8219
8220 * make.adb (Scan_Make_Arg): Reject options that should start with "--"
8221 and start with only one, such as "-RTS=none".
8222 (Collect_Arguments): Do not check for sources outside of projects.
8223 Do not collect arguments if project is externally built.
8224 (Compile_Sources): Do nothing, not even check if the source is up to
8225 date, if its project is externally built.
8226 (Compile): When compiling a predefined source, add -gnatpg
8227 as the second switch, after -c.
8228 (Compile_Sources): Allow compilation of Annex J renames without -a
8229 (Is_In_Object_Directory): Check if the ALI file is in the object
8230 even if there is no project extension.
8231 (Create_Binder_Mapping_File): Only put a unit in the mapping file for
8232 gnatbind if the ALI file effectively exists.
8233 (Initialize): Add the directory where gnatmake is invoked in front of
8234 the path if it is invoked from a bin directory, even without directory
8235 information, so that the correct GNAT tools will be used when spawned
8236 without directory information.
8237
8238 * makeusg.adb: Change switch -S to -eS
8239 Add lines for new switches -we, -wn and -ws
8240 Add line for new switch -p
8241
8242 * prj-proc.adb (Process): Set Success to False when Warning_Mode is
8243 Treat_As_Error and there are warnings.
8244
8245 * switch-m.ads, switch-m.adb (Normalize_Compiler_Switches): Do not skip
8246 -gnatww Change gnatmake switch -S to -eS
8247 (Scan_Make_Switches): Code reorganisation. Process separately multi
8248 character switches and single character switches.
8249 (Scan_Make_Switches): New Boolean out parameter Success. Set Success to
8250 False when switch is not recognized by gnatmake.
8251 (Scan_Make_Switches): Set Setup_Projects True when -p or
8252 --create-missing-dirs is specified.
8253
8254 * fname.adb (Is_Predefined_File_Name): Return True for annex J
8255 renamings Calendar, Machine_Code, Unchecked_Conversion and
8256 Unchecked_Deallocation only when Renamings_Included is True.
8257
8258 * par.adb: Allow library units Calendar, Machine_Code,
8259 Unchecked_Conversion and Unchecked_Deallocation to be recompiled even
8260 when -gnatg is not specified.
8261 (P_Interface_Type_Definition): Remove the formal Is_Synchronized because
8262 there is no need to generate always a record_definition_node in case
8263 of synchronized interface types.
8264 (SIS_Entry_Active): Initialize global variable to False
8265 (P_Null_Exclusion): For AI-447: Add parameter Allow_Anonymous_In_95 to
8266 indicate cases where AI-447 says "not null" is legal.
8267
8268 * makeutl.ads, makeutil.adb (Executable_Prefix_Path): New function
8269
8270 * makegpr.adb (Check_Compilation_Needed): Take into account dependency
8271 files with with several lines starting with the object fileb name.
8272 (Scan_Arg): Set Setup_Projects True when -p or --create-missing-dirs
8273 is specified.
8274 (Initialize): Add the directory where gprmake is invoked in front of the
8275 path, if it is invoked from a bin directory or with directory
8276 information, so that the correct GNAT tools will be used when invoked
8277 directly.
8278 (Check_Compilation_Needed): Process correctly backslashes on Windows.
8279
8280 * vms_data.ads: Update switches/qualifiers
8281
82822007-04-06 Ed Schonberg <schonberg@adacore.com>
8283 Thomas Quinot <quinot@adacore.com>
8284
8285 * exp_aggr.adb:
8286 If the array component is a discriminated record, the array aggregate
8287 is non-static even if the component is given by an aggregate with
8288 static components.
8289 (Expand_Record_Aggregate): Use First/Next_Component_Or_Discriminant
8290 (Convert_Aggr_In_Allocator): If the allocator is for an access
8291 discriminant and the type is controlled. do not place on a finalization
8292 list at this point. The proper list will be determined from the
8293 enclosing object.
8294 (Build_Record_Aggr_Code): If aggregate has box-initialized components,
8295 initialize record controller if needed, before the components, to ensure
8296 that they are properly finalized.
8297 (Build_Record_Aggr_Code): For the case of an array component that has a
8298 corresponding array aggregate in the record aggregate, perform sliding
8299 if required.
8300
83012007-04-06 Javier Miranda <miranda@adacore.com>
8302 Gary Dismukes <dismukes@adacore.com>
8303 Ed Schonberg <schonberg@adacore.com>
8304
8305 * exp_ch13.adb (Expand_External_Tag_Definition): Replace call to the
8306 run-time subprogram Set_External_Tag by call to Build_Set_External_Tag.
8307
8308 * exp_ch4.adb (Expand_Allocator_Expression): Don't perform a run-time
8309 accessibility on class-wide allocators if the allocator occurs at the
8310 same scope level as the allocator's type. The check is guaranteed to
8311 succeed in that case, even when the expression originates from a
8312 parameter of the containing subprogram.
8313 (Expand_N_Op_Eq): Do nothing in case of dispatching call if compiling
8314 under No_Dispatching_Calls restriction. During the semantic analysis
8315 we already notified such violation.
8316 (Tagged_Membership): Constant folding. There is no need to check
8317 the tag at run-time if the type of the right operand is non
8318 class-wide abstract.
8319 Replace call to Is_Ancestor by call to Is_Parent
8320 to support concurrent types with interface types.
8321 (Expand_N_Allocator): Add an assertion associated with the generation
8322 of the master_id.
8323 (Expand_N_Slice): Do not enable range check to nodes associated
8324 with the frontend expansion of the dispatch table.
8325 (Is_Local_Access_Discriminant): Subsidiary function to
8326 Expand_N_Allocator.
8327 (Tagged_Membership): Replace generation of call to the run-time
8328 subprogram CW_Membership by call to Build_CW_Membership.
8329 (Expand_Allocator_Expression): Replace generation of call to the
8330 run-time subprogram Get_Access_Level by call to Build_Get_Access_Level.
8331
8332 * exp_disp.ads, exp_disp.adb (Make_DT): Code reorganization to
8333 initialize most the TSD components by means of an aggregate.
8334 Modify the declaration of the object containing the TSD
8335 because we now expand code that has a higher level of abstraction.
8336 The TSD has a discriminant containing the Inheritance Depth Level,
8337 value that is used in the membership test but also to fix the size
8338 of the table of ancestors.
8339 (Expand_Interface_Conversion): Insert function body at the closest place
8340 to the conversion expression, to prevent access-before-elaboration
8341 errors in the backend.
8342 Code improved to reduce the size of the dispatch table if
8343 compiling under restriction No_Dispatching_Calls plus code cleanup.
8344 Code reorganization plus removal of calls to Set_Num_Prim_Ops
8345 (Make_Secondary_DT): Remove call to Set_Num_Prim_Ops.
8346 (Expand_Dispatching_Call): Minor code reorganization plus addition of
8347 code to return immediately if compiling under No_Dispatching_Calls
8348 restriction.
8349 (Set_All_DT_Position): Remove code associated with the old CPP pragmas.
8350 CPP_Virtual and CPP_Vtable are no longer supported.
8351 (Expand_Interface_Conversion): Add missing support for interface type
8352 derivations.
8353 (Expand_Interface_Actuals): Replace calls to Is_Ancestor by calls to
8354 Is_Parent to support concurrent types with interfaces.
8355 (Init_Predefined_Interface_Primitives): Removed.
8356 (Make_Secondary_DT): Modified to support concurrent record types.
8357 (Set_All_DT_Position): Modified to support concurrent record types.
8358 (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entries associated
8359 with Get_External_Tag, Inherit_TSD, Set_External_Tag.
8360 (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entry associated
8361 with CW_Membership.
8362 (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entries associated
8363 with Get_Access_Level, Get_Predefined_Prim_Op_Address,
8364 Get_Prim_Op_Address Get_RC_Offset, Get_Remotely_Callable, Inherit_DT,
8365 Set_Access_Level, Set_Expanded_Name, Set_Predefined_Prim_Op_Address,
8366 Set_Prim_Op_Address, Set_RC_Offset, Set_Remotely_Callable, Set_TSD.
8367 (Expand_Dispatching_Call): Replace generation of call to the run-time
8368 subprograms Get_Predefined_Prim_Op_Address and Get_Prim_Op_Address by
8369 calls to Build_Get_Predefined_Prim_Op_Address, and Build_Get_Prim_Op_
8370 Address.
8371 (Fill_DT_Entry, Fill_Secondary_DT_Entry): Replace generation of call to
8372 the run-time subprograms Set_Predefined_Prim_Op_Address and Set_Prim_
8373 Op_Address by calls to Build_Set_Predefined_Prim_Op_Address, and
8374 Build_Set_Prim_Op_Address.
8375 (Get_Remotely_Callable): Subprogram removed.
8376 (Init_Predefined_Interface_Primitives): Replace generation of call to
8377 the run-time subprograms Inherit_DT by call to Build_Inherit_Predefined_
8378 Prims.
8379
8380 * sem_elab.adb (Set_Elaboration_Constraint): Replace the call to
8381 First (Parameter_Associations ()) with the call to First_Actual that
8382 returns an actual parameter expression for both named and positional
8383 associations.
8384
8385 * sem_disp.adb (Check_Dispatching_Call): In case of dispatching call
8386 check violation of restriction No_Dispatching_Calls.
8387 (Check_Controlling_Type): A formal of a tagged incomplete type is a
8388 controlling argument.
8389
8390 * exp_util.ads, exp_util.adb (Type_May_Have_Bit_Aligned_Components): Use
8391 First/Next_Component_Or_Discriminant
8392 (Insert_Actions): Add entries for new N_Push and N_Pop nodes
8393 (Find_Implemented_Interface): Removed. All the calls to this subprogram
8394 specify Any_Limited_Interface, and this functionality is already
8395 provided by the function Has_Abstract_Interfaces.
8396 (Find_Interface, Find_Interface_Tag, Find_Interface_ADT): Modified to
8397 support concurrent types implementing interfaces.
8398 (Find_Implemented_Interface): Removed. All the calls to this subprogram
8399 specify kind Any_Limited_Interface, and this functionality is already
8400 provided by the function Has_Abstract_Interfaces.
8401 (Remove_Side_Effects): replace Controlled_Type by
8402 CW_Or_Controlled_Type whenever the issue is related to
8403 using or not the secondary stack.
8404
8405 * par-ch12.adb (P_Formal_Type_Definition): Update calls to
8406 P_Interface_Type_Definition to fulfill the new interface (the formal
8407 Is_Synchronized is no longer required).
8408
8409 * Make-lang.in (GNAT_ADA_OBJS): Addition of exp_atag.o
8410 Update dependencies.
8411
8412 * exp_atag.ads, exp_atag.adb: New file
8413
84142007-04-06 Ed Schonberg <schonberg@adacore.com>
8415 Bob Duff <duff@adacore.com>
8416 Cyrille Comar <comar@adacore.com>
8417
8418 * exp_ch7.ads, exp_ch7.adb (Find_Final_List): If the access type is
8419 anonymous, use finalization list of enclosing dynamic scope.
8420 (Expand_N_Package_Declaration): For a library package declaration
8421 without a corresponding body, generate RACW subprogram bodies in the
8422 spec (just as we do for the task activation call).
8423 (Convert_View): Split Is_Abstract flag into Is_Abstract_Subprogram and
8424 Is_Abstract_Type. Make sure these are called only when appropriate.
8425 Remove all code for DSP option
8426 (CW_Or_Controlled_Type): new subprogram.
8427
84282007-04-06 Eric Botcazou <botcazou@adacore.com>
8429 Ed Schonberg <schonberg@adacore.com>
8430 Gary Dismukes <dismukes@adacore.com>
8431
8432 * exp_ch9.ads, exp_ch9.adb (Family_Offset): Add new 'Cap' boolean
8433 parameter. If it is set to true, return a result capped according to
8434 the global upper bound for the index of an entry family.
8435 (Family_Size): Add new 'Cap' boolean parameter. Pass it to Family_Offset
8436 (Build_Find_Body_Index): Adjust for above change.
8437 (Entry_Index_Expression): Likewise.
8438 (Is_Potentially_Large_Family): New function extracted from...
8439 (Collect_Entry_Families): ...here. Call it to detect whether the family
8440 is potentially large.
8441 (Build_Entry_Count_Expression): If the family is potentially large, call
8442 Family_Size with 'Cap' set to true.
8443 (Expand_N_Protected_Type_Declaration, Expand_N_Protected_Body): Generate
8444 a protected version of an operation declared in the private part of
8445 a protected object, because they may be invoked through a callback.
8446 (Set_Privals): If the type of a private component is an anonymous access
8447 type, do not create a new itype for each protected body.
8448 If the body of a protected operation creates
8449 controlled types (including allocators for class-widetypes), the
8450 body of the corresponding protected subprogram must include a
8451 finalization list.
8452 (Build_Activation_Chain_Entity): Build the chain entity for extended
8453 return statements.
8454 (Type_Conformant_Parameters): Use common predicate Conforming_Types
8455 to determine whether operation overrides an inherited primitive.
8456 (Build_Wrapper_Spec): Add code to examine the parents while looking
8457 for a possible overriding candidate.
8458 (Build_Simple_Entry_Call): Set No_Initialization on the object used to
8459 hold an actual parameter value since its initialization is separated
8460 from the the declaration. Prevents errors on null-excluding access
8461 formals.
8462
84632007-04-06 Thomas Quinot <quinot@adacore.com>
8464
8465 * exp_dist.ads, exp_dist.adb (Build_To_Any_Call, Build_From_Any_Call):
8466 Do an Unchecked_Conversion to handle the passage from the Underlying
8467 Type to the Base Type when calling Build_To_Any_Call and
8468 Build_From_Any_Call.
8469 (Build_Actual_Object_Declaration): Set Object's Ekind to E_Variable or
8470 E_Constant, depending upon Variable formal.
8471 (GARLIC_Support.Build_Subprogram_Receiving_Stubs,
8472 PolyORB_Support.Build_Subprogram_Receiving_Stubs): For a formal
8473 parameter that requires an extra constrained parameter, declare
8474 temporary for actual as a variable, not a constant.
8475 (Add_RACW_Primitive_Declarations_And_Bodies): Generate bodies only when
8476 the unit being compiled is the one that contains the stub type.
8477 Change primitive operation name for the RACW associated with a RAS
8478 from Call to _Call so it cannot clash with any legal identifier.
8479 (PolyORB_Support.Add_RACW_Write_Attribute): Remove unused constant
8480 Is_RAS.
8481 (Append_RACW_Bodies): New subprogram.
8482 (Expand_Receiving_Stubs_Bodies): Pass a 'Stmts' list to
8483 Add_Receiving_Stubs_To_Declarations functions.
8484 When expanding a package body, this list correspond to the
8485 statements in the HSS at the end of the pacakge.
8486 When expanding a package spec, this list correspond to the
8487 spec declarations.
8488 (Add_Receiving_Stubs_To_Declarations): Append the function
8489 registering the receiving stubs at the end of the 'Stmts' list.
8490 (RCI_Package_Locator): Pass the new Version generic formal when
8491 instantiating a RCI_Locator package.
8492 (Build_From_Any_Function): To compute the High bound for an
8493 unconstrained array actual, we add the Low bound with the length.
8494 Thus we must convert the low bound and the length to an appropriate
8495 type before doing the sum.
8496 (Build_Subprogram_Receiving_Stubs, PolyORB):
8497 * Retrieve the extra formals parameters at the
8498 end of the parameter stream.
8499 * Use Move_Any_Value to write back out parameters
8500 after executing the request as it is more efficient
8501 than Copy_Any_Value.
8502 * Build the any containing Extra Formals with the
8503 appropriate typecode.
8504 (PolyORB_Support.Helpers.Append_Record_Traversal): Nothing to do for an
8505 empty Component_List.
8506 (Build_Actual_Object_Declaration): New subprogram. Build and insert into
8507 the tree the declaration for an object that serves as actual parameter
8508 in server-side stubs.
8509 (GARLIC_Support.Build_Subprogram_Receiving_Stubs,
8510 PolyORB_Support.Build_Subprogram_Receiving_Stubs):
8511 Use Build_Actual_Object_Declaration to prepare the actuals.
8512 (Add_Parameter_To_NVList): Set the parameter mode to In for
8513 Extra Constrained Parameters.
8514 (Build_General_Calling_Stubs): Set the parameter type to boolean for
8515 Extra Constrained parameters.
8516 (Build_To_Any_Function, Build_From_Any_Function,
8517 Built_TypeCode_Function): When Typ is implicit, call the correct
8518 function with the first not implicit parent type.
8519 (TC_Rec_Add_Process_Element, FA_Rec_Add_Process_Element,
8520 (FA_Ary_Add_Process_Element): When Datum is an Any, we cannot infer the
8521 typecode from the Etype. Therefore we retrieve the correct typecode
8522 with a call to Get_Any_Type.
8523 (Copy_Specification): Do controlling formal type substitution based on
8524 Is_Controlling_Formal flag, instead of caller-provided object type.
8525 (Build_Subprogram_Calling_Stubs): When retrieveing the original spec for
8526 a RACW primitive operation, we might get a subprogram declaration for an
8527 ancestor of the RACW designated type (not for the designated type
8528 itself), in the case where this operation is inherited. In this case we
8529 have no easy means of determining the original tagged type for which
8530 the primitive was declared, so instead we now rely on
8531 Copy_Specification to use the Is_Controlling_Formal flag to determine
8532 which formals require type substitution.
8533
85342007-04-06 Robert Dewar <dewar@adacore.com>
8535 Ed Schonberg <schonberg@adacore.com>
8536
8537 * exp_intr.adb (Expand_Exception_Call): Calls to subprograms in
8538 GNAT.Current_Exception are not allowed if pragma Restrictions
8539 (No_Exception_Propagation) is set and in any case make the associated
8540 handler unsuitable as a target for a local raise statement.
8541 (Expand_Dispatching_Constructor_Call): Replace generation of call to the
8542 run-time subprogram CW_Membership by call to Build_CW_Membership.
8543 (Expand_Dispatching_Constructor_Call): If the dispatching tag is given
8544 by a function call, a temporary must be created before expanding the
8545 Constructor_Call itself, to prevent out-of-order elaboration in the
8546 back-end when stack checking is enabled..
8547
85482007-04-06 Ed Schonberg <schonberg@adacore.com>
8549
8550 * exp_pakd.adb (Expand_Packed_Boolean_Operator): The bounds of the
8551 result are the bounds of the left operand, not the right.
8552
85532007-04-06 Ed Schonberg <schonberg@adacore.com>
8554
8555 * exp_strm.adb
8556 (Build_Mutable_Record_Write_Procedure): For an Unchecked_Union type, use
8557 discriminant defaults.
8558 (Build_Record_Or_Elementary_Output_Procedure): Ditto.
8559 (Make_Component_List_Attributes): Ditto.
8560
85612007-04-06 Ed Schonberg <schonberg@adacore.com>
8562 Bob Duff <duff@adacore.com>
8563
8564 * sem_aggr.adb (Resolve_Record_Aggregate): In semantics-only mode treat
8565 an association with a box as providing a value even though the
8566 initialization procedure for the type is not available.
8567 (Resolve_Record_Aggregate): Check that a choice of an association with a
8568 box corresponds to a component of the type.
8569 (Resolve_Record_Aggregate): Split Is_Abstract flag into
8570 Is_Abstract_Subprogram and Is_Abstract_Type.
8571
8572 * exp_tss.adb (Base_Init_Proc): Use Is_Type instead of Type_Kind for
8573 assert.
8574
8575 * inline.adb (Add_Inlined_Body): Split Is_Abstract flag into
8576 Is_Abstract_Subprogram and Is_Abstract_Type. Make sure these are
8577 called only when appropriate.
8578
85792007-04-06 Olivier Hainque <hainque@adacore.com>
8580
8581 * g-alleve.ads (Low Level Vector type definitions): Map each to the
8582 associated vector view instead of all to the unsigned char view.
8583
8584 * g-altcon.adb (Generic_Conversions): New internal generic package,
8585 offering facilities for all the Vector/View conversion routines
8586 implemented by this unit.
8587 (To_View/To_Vector - all versions): Reimplemented in a systematic
8588 manner, using the internal Generic_Conversions facilities.
8589
85902007-04-06 Pascal Obry <obry@adacore.com>
8591
8592 * g-arrspl.adb (Free) [Element_Access]: New routine to free the source
8593 string.
8594 (Create): Free the source string before storing the new one.
8595
85962007-04-06 Vincent Celier <celier@adacore.com>
8597
8598 * g-debpoo.adb (Validity): New package with a complete new
8599 implementation of subprograms Is_Valid and Set_Valid.
8600 (Is_Valid): Move to local package Validity
8601 (Set_Valid): Move to local package Validity
8602
86032007-04-06 Arnaud Charlet <charlet@adacore.com>
8604
8605 * g-expect.adb (Get_Command_Output): When expanding the output buffer
8606 we must ensure that there is enough place for the new data we are going
8607 to copy in.
8608
86092007-04-06 Thomas Quinot <quinot@adacore.com>
8610
8611 * g-md5.ads, g-md5.adb (Digest): Fix off-by-one error in padding
8612 computation.
8613
86142007-04-06 Jose Ruiz <ruiz@adacore.com>
8615 Vincent Celier <celier@adacore.com>
8616
8617 * gnatcmd.adb (B_Start): Add prefix of binder generated file.
8618 (Stack_String): Add this String that contains the name of the Stack
8619 package in the project file.
8620 (Packages_To_Check_By_Stack): Add this list that contains the packages
8621 to be checked by gnatstack, which are the naming and the stack packages.
8622 (Check_Files): If no .ci files were specified for gnatstack we add all
8623 the .ci files belonging to the projects, including binder generated
8624 files.
8625 (Non_VMS_Usage): Document that gnatstack accept project file switches.
8626 (GNATCmd): Update the B_Start variable if we are in a VMS environment.
8627 Add gnatstack to the list of commands that use project file related
8628 switches, and get the single attribute Switches from the stack package
8629 in a project file when calling gnatstack. Parse the -U flag for
8630 processing files belonging to all projects in the project tree.
8631 Remove all processing for command Setup
8632
8633 * prj-attr.adb: Add new package Stack with single attribute Switches
8634
8635 * vms_conv.ads (Command_Type): Add command Stack.
8636 Move to body declarations that are only used in the body: types Item_Id,
8637 Translation_Type, Item_Ptr, Item and its subtypes.
8638
8639 * vms_conv.adb: (Initialize): Add data for new command Stack.
8640 Add declarations moved from the spec: types Item_Id, Translation_Type,
8641 Item_Ptr, Item and its subtypes.
8642 (Cargs_Buffer): New table
8643 (Cargs): New Boolean global variable
8644 (Process_Buffer): New procedure to create arguments
8645 (Place): Put character in table Buffer or Cargs_Buffer depending on the
8646 value of Cargs.
8647 (Process_Argument): Set Cargs when processing qualifiers for GNAT
8648 COMPILE
8649 (VMS_Conversion): Call Process_Buffer for table Buffer and, if it is not
8650 empty, for table Cargs_Buffer.
8651 (Initialize): Remove component Setup in Command_List
8652
86532007-04-06 Vincent Celier <celier@adacore.com>
8654
8655 * gprep.adb (Process_Files.Process_One_File): Use full file name when
8656 issuing pragma Source_Reference.
8657
86582007-04-06 Emmanuel Briot <briot@adacore.com>
8659
8660 * g-regpat.adb (Parse_Posix_Character_Class): Fix handling of
8661 [[:xdigit:]] character class.
8662 Also raise an exception when an invalid character class is used.
8663
86642007-04-06 Pascal Obry <obry@adacore.com>
8665
8666 * i-cstrea.ads: (fopen): Add encoding parameter.
8667 (freopen): Idem.
8668 Change reference from a-sysdep.c to sysdep.c in comment.
8669 Update copyright notice.
8670 This set of patch add support for the encoding form parameter.
8671
8672 * mingw32.h (S2WSU): New macro to convert from a string to a
8673 wide-string using the UTF-8 encoding. The S2WS macro supports now only
8674 standard 8bits encoding.
8675 (WS2SU): As above but converting from wide-sring to string.
8676 This is needed as it is necessary to have access to both versions in the
8677 runtime for the form parameter encoding support.
8678 This set of patch add support for the encoding form parameter.
8679 (S2WS): Improve implementation to handle cases where the filename is not
8680 UTF-8 encoded. In this case we default to using the current code page
8681 for the conversion.
8682
8683 * s-crtl-vms64.ads, s-crtl.ads (Filename_Encoding): New enumeration
8684 type (UTF8, ASCII_8bits). This enumeration has a rep clause to match
8685 the constants defined in adaint.h.
8686 (fopen): Add encoding parameter.
8687 (freopen): Idem.
8688
8689 * s-ficobl.ads (AFCB): Add Encoding field to record the filename
8690 encoding. This is needed for the Reset routine (freopen low level-call).
8691
8692 * s-fileio.adb (Open): Decode encoding form parameter and set the
8693 corresponding encoding value into AFCB structure.
8694 (Reset): Pass the encoding value to freopen.
8695 (Close): Move the call to Lock_Task to the beginning of the procedure.
8696
86972007-04-06 Geert Bosch <bosch@adacore.com>
8698 Robert Dewar <dewar@adacore.com>
8699
8700 * i-fortra.ads: Add Double_Complex type.
8701
8702 * impunit.adb: (Is_Known_Unit): New function
8703 Add Gnat.Byte_Swapping
8704 Add GNAT.SHA1
8705 Add new Ada 2005 units
8706 Ada.Numerics.Generic_Complex_Arrays, Ada.Numerics.Generic_Real_Arrays,
8707 Ada.Numerics.Complex_Arrays, Ada.Numerics.Real_Arrays,
8708 Ada.Numerics.Long_Complex_Arrays, Ada.Numerics.Long_Long_Complex_Arrays,
8709 Ada.Numerics.Long_Long_Real_Arrays and Ada.Numerics.Long_Real_Arrays
8710
8711 * impunit.ads (Is_Known_Unit): New function
8712
8713 * a-ngcoar.adb, a-ngcoar.ads, a-ngrear.adb,
8714 a-ngrear.ads, a-nlcoar.ads, a-nllcar.ads, a-nllrar.ads, a-nlrear.ads,
8715 a-nucoar.ads, a-nurear.ads, g-bytswa.adb, g-bytswa-x86.adb,
8716 g-bytswa.ads, g-sha1.adb, g-sha1.ads, i-forbla.ads, i-forlap.ads,
8717 s-gearop.adb, s-gearop.ads, s-gecobl.adb, s-gecobl.ads, s-gecola.adb,
8718 s-gecola.ads, s-gerebl.adb, s-gerebl.ads, s-gerela.adb, s-gerela.ads:
8719 New files.
8720
8721 * Makefile.rtl: Add g-bytswa, g-sha1, a-fzteio and a-izteio
8722
8723 * a-fzteio.ads, a-izteio.ads: New Ada 2005 run-time units.
8724
87252007-04-06 Eric Botcazou <botcazou@adacore.com>
8726 Arnaud Charlet <charlet@adacore.com>
8727
8728 * init.c: Reuse PA/HP-UX code for IA-64/HP-UX, except
8729 __gnat_adjust_context_for_raise.
8730 (__gnat_init_float): on x86 vxworks 5.x and 6.x, we use the same
8731 implementation of floating point operations as native x86 targets.
8732 So the FPU should be initialized in the same way using finit. Fix
8733 floating point operations accuracy issues.
8734 (__gnat_install_handler, case FreeBSD): Use proper type for sa_sigaction
8735 member in struct sigaction, so as to avoid warning for incompatible
8736 pointer types.
8737
87382007-04-06 Serguei Rybin <rybin@adacore.com>
8739
8740 * lib.ads, lib.adb (Tree_Read): Release the memory occupied by the
8741 switches from previously loaded tree
8742
87432007-04-06 Thomas Quinot <quinot@adacore.com>
8744
8745 * lib-writ.adb (Write_With_Lines): Factor duplicated code between the
8746 cases where a given dependency has a body or not.
8747 (Write_With_File_Names): New subprogram, common code for the two cases
8748 above.
8749
87502007-04-06 Ed Schonberg <schonberg@adacore.com>
8751 Javier Miranda <miranda@adacore.com>
8752
8753 * lib-xref.ads, lib-xref.adb:
8754 Modify the loop that collects type references, to include interface
8755 types that the type implements. List each of these interfaces when
8756 building the entry for the type.
8757 (Generate_Definition): Initialize component Def and Typ of new entry
8758 in table Xrefs, to avoid to have these components unitialized.
8759 (Output_References): Split Is_Abstract flag into
8760 Is_Abstract_Subprogram and Is_Abstract_Type.
8761 (Generate_Reference): Add barrier to do not generate the warning
8762 associated with Ada 2005 entities with entities generated by the
8763 expander.
8764
87652007-04-06 Robert Dewar <dewar@adacore.com>
8766 Arnaud Charlet <charlet@adacore.com>
8767 Vincent Celier <celier@adacore.com>
8768
8769 * gnat_rm.texi, gnat_ugn.texi: Add -gnatyl documentation
8770 Update 'Exception Handling Control' chapter which was outdated.
8771 Minor fix to documentation of -gnatwq
8772 Remove section "Adapting the Run Time to a New C++ Compiler" because
8773 it is now obsolete.
8774 Add passage on need of -nostart-files in some non-ada-main cases.
8775 Document new switch -eS (/STANDARD_OUTPUT_FOR_COMMANDS) for gnatmake
8776 Update documentation about Interfacing with C++
8777 Add documentation for new gnatmake switch -p
8778 Add missing protocol part in URLs.
8779 Document -gnatyA
8780 Document pragma Compile_Time_Error
8781 Add documentation for Object_Size indicating that stand alone
8782 objects can have a larger size in some cases.
8783 Add node for GNAT.Byte_Swapping, GNAT.SHA1
8784 Update reference to the Ravenscar profile.
8785 Document pragma Unreferenced_Objects
8786
8787 * gnat-style.texi: Fix typo
8788
87892007-04-06 Vincent Celier <celier@adacore.com>
8790
8791 * mlib.adb (Building_Library): Only output "building a library..." in
8792 verbose mode
8793
8794 * mlib-prj.adb (Build_Library): Only output lists of object and ALI
8795 files in verbose mode.
8796
8797 * mlib-utl.adb (Ar): Only output the first object files when not in
8798 verbose mode.
8799 (Gcc): Do not display all the object files if not in verbose mode, only
8800 the first one.
8801
88022007-04-06 Robert Dewar <dewar@adacore.com>
8803
8804 * namet.ads, namet.adb (wn): Improve this debugging routine. Calling
8805 it no longer destroys the contents of Name_Buffer or Name_Len and
8806 non-standard and invalid names are handled better.
8807 (Get_Decoded_Name_String): Improve performance by using
8808 Name_Has_No_Encodings flag in the name table.
8809 (Is_Valid_Name): New function to determine whether a Name_Id is valid.
8810 Used for debugging printouts.
8811
88122007-04-06 Robert Dewar <dewar@adacore.com>
8813 Javier Miranda <miranda@adacore.com>
8814 Bob Duff <duff@adacore.com>
8815
8816 * par-ch3.adb: (P_Type_Declaration): Set Type_Token_Location
8817 (P_Interface_Type_Definition): Remove the formal Is_Synchronized because
8818 there is no need to generate always a record_definition_node in case
8819 of synchronized interface types.
8820 (P_Type_Declaration): Update calls to P_Interface_Type_Definition.
8821 (P_Null_Exclusion): For AI-447: Remove warnings about "not null" being
8822 illegal in Ada 95, in cases where it is legal. Change the warnings to
8823 errors in other cases. Don't give the error unless the "not null"
8824 parses properly. Correct the source position at which the error occurs.
8825 (P_Known_Discriminant_Part_Opt): Pass Allow_Anonymous_In_95 => True to
8826 P_Null_Exclusion, to suppress "not null" warnings.
8827 (P_Identifier_Declarations): Code cleanup. Removed unrequired label and
8828 associated goto statements.
8829
8830 * par-endh.adb (Pop_End_Context): Allow more flexibility in placement
8831 of END RECORD
8832
8833 * scans.ads (Type_Token_Location): New flag
8834
8835 * par-ch6.adb (P_Mode): Check specifically for case of IN ACCESS
8836 (P_Formal_Part): Pass Allow_Anonymous_In_95 => True to
8837 P_Null_Exclusion, to suppress "not null" warnings.
8838
88392007-04-06 Robert Dewar <dewar@adacore.com>
8840 Javier Miranda <miranda@adacore.com>
8841 Bob Duff <duff@adacore.com>
8842 Vincent Celier <celier@adacore.com>
8843
8844 * par-prag.adb (Prag): Add dummy entry for pragma Compile_Time_Error
8845 (Extensions_Allowed): No longer sets Ada_Version
8846 Entry for pragma Unreferenced_Objects
8847
8848 * sem_prag.adb (Analyze_Pragma, case Priority): Force with of
8849 system.tasking if pragma priority used in a procedure
8850 (Analyze_Pragma, case Warning): Handle dot warning switches
8851 (Process_Compile_Time_Warning_Or_Error): New procedure
8852 (Analyze_Pragma): Add processing for Compile_Time_Error
8853 Add support for extra arguments External_Name and Link_Name.
8854 Remove code associated with pragmas CPP_Virtual and CPP_Vtable.
8855 (Process_Import_Or_Interface): Add support for the use of pragma Import
8856 with tagged types.
8857 (Extensions_Allowed): No longer affects Ada_Version
8858 (Analyze_Pragma): Split Is_Abstract flag into Is_Abstract_Subprogram and
8859 Is_Abstract_Type. Make sure these are called only when appropriate.
8860 Add processing for pragma Unreferenced_Objects
8861
8862 * snames.h, snames.ads, snames.adb: Add entry for pragma
8863 Compile_Time_Error
8864 Add new standard name Minimum_Binder_Options for new gprmake
8865 Add new standard names for gprmake: Archive_Suffix,
8866 Library_Auto_Init_Supported, Library_Major_Minor_Id_Supported,
8867 Library_Support, Library_Version_Options,
8868 Shared_Library_Minimum_Options,
8869 Shared_Library_Prefix, Shared_Library_Suffix, Symbolic_Link_Supported.
8870 Change Name_Call to Name_uCall so that it cannot clash with a legal
8871 subprogram name.
8872 Add new standard names Mapping_Spec_Suffix and Mapping_Body_Suffix
8873 Append C_Plus_Plus to convention identifiers as synonym for CPP
8874 Add new standard names Stack and Builder_Switches
8875 Add new standard names: Compiler_Minimum_Options, Global_Config_File,
8876 Library_Builder, Local_Config_File, Objects_Path, Objects_Path_File,
8877 Run_Path_Option, Toolchain_Version.
8878 Entry for pragma Unreferenced_Objects
8879
8880 * switch-c.adb (Scan_Front_End_Switches): Store correct -gnateD
8881 switches, without repetition of "eD". Make sure that last character of
8882 -gnatep= switch is not taken as -gnat switch character.
8883 Complete rewrite of circuit for handling saving compilation options
8884 Occasioned by need to support dot switchs for -gnatw, but cleans up
8885 things in general.
8886 -gnatX does not affect Ada_Version
8887 Include -gnatyA in -gnatg style switches
8888
8889 * sem_warn.ads, sem_warn.adb (Output_Unreferenced_Messages): Exclude
8890 warnings on return objects.
8891 (Warn_On_Useless_Assignment): Exclude warnings on return objects
8892 (Set_Dot_Warning_Switch): New procedure
8893 (Check_References): Add missing case of test for
8894 Has_Pragma_Unreferenced_Objects
8895 (Output_Unreferenced_Messages): Implement effect of new pragma
8896 Unreferenced_Objects, remove special casing of limited controlled
8897 variables.
8898
88992007-04-06 Vincent Celier <celier@adacore.com>
8900
8901 * prj-ext.adb (Initialize_Project_Path): New procedure that initialize
8902 the default project path, initially done during elaboration of the
8903 package.
8904 If the prefix returned by Sdefault is null, get the prefix from a call
8905 to Executable_Prefix_Path.
8906 (Project_Path): Call Initialize_Project_Path if Current_Project_Path is
8907 null.
8908
8909 * prj-nmsc.adb (Get_Path_Names_And_Record_Sources): Use the non
8910 canonical directory name to open the directory from which files are
8911 retrieved.
8912 (Record_Other_Sources): Idem.
8913 (Locate_Directory): Add the possibility to create automatically missing
8914 directories when Setup_Projects is True.
8915 Call Locate_Directory so that the directory will be created when
8916 Setup_Projects is True, for object dir, library dir, library ALI dir,
8917 library source copy dir and exec dir.
8918
8919 * prj-pp.adb (Max_Line_Length): Set to 255 for compatibility with older
8920 versions of GNAT.
8921
89222007-04-06 Robert Dewar <dewar@adacore.com>
8923
8924 * sem_ch13.ads, sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
8925 Use First/Next_Component_Or_Discriminant
8926 (Analyze_Record_Representation_Clause):
8927 Use First/Next_Component_Or_Discriminant
8928 (Check_Component_Overlap): Use First/Next_Component_Or_Discriminant
8929 (Analyze_Attribute_Definition_Clause, case Value_Size): Reject
8930 definition if type is unconstrained.
8931 (Adjust_Record_For_Reverse_Bit_Order): New procedure
8932 (Analyze_Attribute_Definition_Clause): Split Is_Abstract flag into
8933 Is_Abstract_Subprogram and Is_Abstract_Type.
8934 (Adjust_Record_For_Reverse_Bit_Order): New procedure
8935
8936 * repinfo.adb (List_Record_Info): Use First/
8937 Next_Component_Or_Discriminant.
8938
8939 * style.ads, styleg-c.adb, styleg-c.ads (Check_Array_Attribute_Index):
8940 New procedure.
8941
8942 * stylesw.ads, stylesw.adb: Recognize new -gnatyA style switch
8943 Include -gnatyA in default switches
8944
8945 * opt.ads: (Warn_On_Non_Local_Exception): New flag
8946 (Warn_On_Reverse_Bit_Order): New flag
8947 (Extensions_Allowed): Update the documentation.
8948 (Warn_On_Questionable_Missing_Parens): Now on by default
8949
8950 * usage.adb: Add documentation of -gnatw.x/X switches
8951 Document new -gnatyA style switch
8952 -gnatq warnings are on by default
8953
89542007-04-06 Ed Falis <falis@adacore.com>
8955
8956 * s-carun8.adb, s-carsi8.adb (Compare_Array_?8): modify so that last
8957 full word is no longer compared twice.
8958
89592007-04-06 Ed Schonberg <schonberg@adacore.com>
8960
8961 * sem_ch10.adb (Install_Limited_Context_Clauses.
8962 Expand_Limited_With_Clause): Use a new copy of selector name in the
8963 call to Make_With_Clause. This fixes the tree structure for ASIS
8964 purposes. Nothing is changed in the compiler behaviour.
8965 (Process_Body_Clauses): Handle properly use clauses whose prefix is
8966 a package renaming.
8967 (Install_Limited_With_Clauses): Do not install non-limited view when it
8968 is still incomplete.
8969
89702007-04-06 Ed Schonberg <schonberg@adacore.com>
8971 Gary Dismukes <dismukes@adacore.com>
8972
8973 * sem_ch12.adb (Check_Generic_Actuals): Use first subtype of actual
8974 when capturing size information, instead of base type, which for a
8975 formal array type will be the unconstrained type.
8976 (Analyze_Formal_Object_Declaration): Add check for illegal default
8977 expressions for a formal in object of a limited type.
8978 (Instantiate_Object): Ditto.
8979 (Check_Formal_Package_Instance): Skip entities that are formal objects,
8980 because they were defaulted in the formal package and no check applies
8981 to them.
8982 (Check_Formal_Package_Instance): Extend conformance check to other
8983 discrete types beyond Integer.
8984 (Process_Default): Copy directly the unmatched formal. A generic copy
8985 has already been performed in Analyze_Formal_Package.
8986 (Analyze_Associations): If a formal subprogram has no match, check for
8987 partial parametrization before looking for a default, to prevent
8988 spurious errors.
8989 (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation): Do
8990 not set the instantiation environment before analyzing the actuals.
8991 Fixes regression on 8515-003 with implementation of AI-133.
8992 Set_Instance_Env checks whether the generic unit is a predefined
8993 unit, in which case the instance must be analyzed with the latest Ada
8994 mode. This setting must take place after analysis of the actuals,
8995 because the actuals must be analyzed and frozen in the Ada mode extant
8996 outside of the current instantiation.
8997 (Save_Env, Restore_Env): Preserve and restore the configuration
8998 parameters so that predefined units can be compiled in the proper Ada
8999 mode.
9000 (Analyze_Formal_Object_Declaration,Analyze_Formal_Subprogram,
9001 Instantiate_Type): Split Is_Abstract flag into Is_Abstract_Subprogram
9002 and Is_Abstract_Type.
9003 (Analyze_Formal_Package): For better error recovery, Add exception
9004 handler to catch Instantion_Error, which can be raised in
9005 Analyze_Associations
9006
90072007-04-06 Ed Schonberg <schonberg@adacore.com>
9008 Bob Duff <duff@adacore.com>
9009 Gary Dismukes <dismukes@adacore.com>
9010
9011 * sem_ch4.adb (Try_Primitive_Operation): The call is legal if the
9012 prefix type is a discriminated subtype of the type of the formal.
9013 (Analyze_Allocator): Collect all coextensions regardless of the context.
9014 Whether they can be allocated statically is determined in exp_ch4.
9015 (Analyze_Selected_Component): If the prefix is a limited view and the
9016 non-limited view is available, use the non-limited one.
9017 (Operator_Check): For "X'Access = Y'Access" (which is ambiguous, and
9018 therefore illegal), suggest a qualified expression rather than a type
9019 conversion, because a type conversion would be illegal in this context.
9020 (Anayze_Allocator): Trace recursively all nested allocators so that all
9021 coextensions are on the corresponding list for the root. Do no mark
9022 coextensions if the root allocator is within a declaration for a stack-
9023 allocated object, because the access discriminants will be allocated on
9024 the stack as well.
9025 (Analyze_Call): Remove restriction on calls to limited functions for the
9026 cases of generic actuals for formal objects, defaults for formal objects
9027 and defaults for record components.
9028 (Analyze_Allocator): Before analysis, chain coextensions on the proper
9029 element list. Their expansion is delayed until the enclosing allocator
9030 is processed and its finalization list constructed.
9031 (Try_Primitive_Operation): If the prefix is a concurrent type, looks
9032 for an operation with the given name among the primitive operations of
9033 the corresponding record type.
9034 (Analyze_Selected_Component): If the prefix is a task type that
9035 implements an interface, and there is no entry with the given name,
9036 check whether there is another primitive operation (e.g. a function)
9037 with that name.
9038 (Try_Object_Operation, Analyze_One_Call, Try_Indexed_Call): Handle
9039 properly the indexing of a function call written in prefix form, where
9040 the function returns an array type, and all parameters of the function
9041 except the first have defaults.
9042 (Analyze_Equality_Op): If this is a call to an implicit inequality, keep
9043 the original operands, rather than relocating them, for efficiency and
9044 to work properly when an operand is overloaded.
9045 (Analyze_Allocator,Operator_Check,Remove_Abstract_Operations): Split
9046 Is_Abstract flag into Is_Abstract_Subprogram and Is_Abstract_Type.
9047 (Analyze_Selected_Component): If the prefix is a private extension, only
9048 scan the visible components, not those of the full view.
9049 (Try_Primitive_Operation): If the operation is a procedure, collect all
9050 possible interpretations, as for a function, because in the presence of
9051 classwide parameters several primitive operations of the type can match
9052 the given arguments.
9053
90542007-04-06 Ed Schonberg <schonberg@adacore.com>
9055 Robert Dewar <dewar@adacore.com>
9056
9057 * sem_ch5.adb (Analyze_Assignment): Reject a right-hand side that is a
9058 tag-indeterminate call to an abstract function, when the left-hand side
9059 is not classwide.
9060 (Analyze_Loop_Statement): Improve detection of infinite loops
9061
90622007-04-06 Ed Schonberg <schonberg@adacore.com>
9063 Thomas Quinot <quinot@adacore.com>
9064
9065 * sem_ch7.ads, sem_ch7.adb (Inspect_Deferred_Constant_Completion): Move
9066 out of Analyze_Package_Declaration, because processing must be applied
9067 to package bodies as well, for deferred constants completed by pragmas.
9068 (Analyze_Package_Declaration): When the package declaration being
9069 analyzed does not require an explicit body, call Check_Completion.
9070 (May_Need_Implicit_Body): An implicit body is required when a package
9071 spec contains the declaration of a remote access-to-classwide type.
9072 (Analyze_Package_Body): If the package contains RACWs, append the
9073 pending subprogram bodies generated by exp_dist at the end of the body.
9074 (New_Private_Type,Unit_Requires_Body): Split Is_Abstract flag into
9075 Is_Abstract_Subprogram and Is_Abstract_Type.
9076 (Preserve_Full_Attributes): The full entity list is not an attribute
9077 that must be preserved from full to partial view.
9078
9079 * sem_dist.adb (Add_RAS_Dereference_TSS):
9080 Change primitive name to _Call so it cannot clash with any legal
9081 identifier, and be special-cased in Check_Completion.
9082 Mark the full view of the designated type for the RACW associated with
9083 a RAS as Comes_From_Source to get proper view switching when installing
9084 private declarations.
9085 Provite a placeholder nested package body along with the nested spec
9086 to have a place for Append_RACW_Bodies to generate the calling stubs
9087 and stream attributes.
9088
90892007-04-06 Ed Schonberg <schonberg@adacore.com>
9090 Robert Dewar <dewar@adacore.com>
9091
9092 * sem_ch8.adb (Has_Components): If the argument is an incomplete type
9093 that is a limited view, check the non-limited view if available.
9094 (Undefined): Refine error message for missing with of Text_IO
9095 (Find_Expanded_Name): Use Is_Known_Unit for more accurate error message
9096 to distinguish real missing with cases.
9097 Fix format of all missing with messages
9098 (Analyze_Subprogram_Renaming): Emit proper error message on illegal
9099 renaming as body when renamed entity is abstract.
9100
91012007-04-06 Ed Schonberg <schonberg@adacore.com>
9102 Javier Miranda <miranda@adacore.com>
9103
9104 * sem_type.ads, sem_type.adb (Has_Abstract_Interpretation): Make
9105 predicate recursive, to handle complex expressions on literals whose
9106 spurious ambiguity comes from the abstract interpretation of some
9107 subexpression.
9108 (Interface_Present_In_Ancestor): Add support to concurrent record
9109 types.
9110 (Add_One_Interp,Disambiguate): Split Is_Abstract flag into
9111 Is_Abstract_Subprogram and Is_Abstract_Type.
9112
91132007-04-06 Ed Schonberg <schonberg@adacore.com>
9114 Javier Miranda <miranda@adacore.com>
9115
9116 * sem_util.ads, sem_util.adb (Object_Access_Level): If the object is a
9117 dereference of a local object R created as a reference to another
9118 object O, use the access level of O.
9119 (Matches_Prefixed_View_Profile): Use common predicate Conforming_Types,
9120 rather than local Same_Formal_Type, to check whether protected operation
9121 overrides an inherited one.
9122 (Same_Formal_Type): New predicate, used when matching signatures of
9123 overriding synchronized operations, to handle the case when a formal
9124 has a type that is a generic actual.
9125 (Is_Aliased_View): Replace check on E_Task_Type and E_Protected_Type by
9126 predicate Is_Concurrent_Type. This ensures supportin case of subtypes.
9127 (Needs_One_Actual): New predicate, for Ada 2005 use, to resolve
9128 syntactic ambiguities involving indexing of function calls that return
9129 arrays.
9130 (Abstract_Interface_List): New subprogram that returns the list of
9131 abstract interfaces associated with a concurrent type or a
9132 concurrent record type.
9133 (Interface_Present_In_Parent): New subprogram used to check if a
9134 given type or some of its parents implement a given interface.
9135 (Collect_Abstract_Interfaces): Add support for concurrent types
9136 with interface types.
9137 (Has_Abstract_Interfaces): Add support for concurrent types with
9138 interface types.
9139 (Is_Parent): New subprogram that determines whether E1 is a parent
9140 of E2. For a concurrent type its parent is the first element of its
9141 list of interface types; for other types this function provides the
9142 same result than Is_Ancestor.
9143 (Enclosing_Subprogram): Add test for N_Extended_Return_Statement.
9144 (Collect_Synchronized_Interfaces): Removed because the subprogram
9145 Collect_Abstract_Interfaces provides this functionality.
9146 (Collect_Abstract_Interfaces): Minor update to give support to
9147 concurrent types and thus avoid undesired code duplication.
9148 (Get_Subprogram_Entity): Handle entry calls.
9149 (May_Be_Lvalue): Include actuals that appear as in-out parameters in
9150 entry calls.
9151 (Enter_Name): Do not give -gnatwh hiding warning for record component
9152 entities, they never result in hiding.
9153
91542007-04-06 Ed Schonberg <schonberg@adacore.com>
9155 Robert Dewar <dewar@adacore.com>
9156
9157 * sinfo.ads, sinfo.adb (Coextensions): New element list for allocators,
9158 to chain nested components that are allocators for access discriminants
9159 of the enclosing object.
9160 Add N_Push and N_Pop nodes
9161 New field Exception_Label added
9162 (Local_Raise_Statements): New field in N_Exception_Handler_Node
9163 (Local_Raise_Not_OK): New flag in N_Exception_Handler_Node
9164 (Is_Coextension): New flag for allocators, to mark allocators that
9165 correspond to access discriminants of dynamically allocated objects.
9166 (N_Block_Statement): Document the fact that the corresponding entity
9167 can be an E_Return_Statement.
9168 (Is_Coextension): New flag for allocators.
9169 Remove all code for DSP option
9170
9171 * sprint.ads, sprint.adb: Display basic information for class_wide
9172 subtypes. Add handling of N_Push and N_Pop nodes
9173
91742007-04-06 Arnaud Charlet <charlet@adacore.com>
9175
9176 * s-tpobop.adb (Exceptional_Complete_Entry_Body): Undefer abortion
9177 before propagating exception.
9178
91792007-04-06 Olivier Hainque <hainque@adacore.com>
9180
9181 * tracebak.c (PC_ADJUST - ia64): -4 instead of -16, expected to yield
9182 an address always within the call instruction from a return address.
9183
91842007-04-06 Olivier Hainque <hainque@adacore.com>
9185 Eric Botcazou <botcazou@adacore.com>
9186
9187 * trans.c (call_to_gnu) <TYPE_RETURNS_BY_TARGET_PTR_P>: Return an
9188 expression with a COMPOUND_EXPR including the call instead of emitting
9189 the call directly here.
9190 (gnat_to_gnu) <N_Slice>: Do not return a non-constant low bound if the
9191 high bound is constant and the slice is empty. Tidy.
9192 (tree_transform, case N_Op_Not): Handle properly the case where the
9193 operation applies to a private type whose full view is a modular type.
9194 (Case_Statement_To_gnu): If an alternative is an E_Constant with an
9195 Address_Clause, use the associated Expression as the GNAT tree
9196 representing the choice value to ensure the corresponding GCC tree is
9197 of the proper kind.
9198 (maybe_stabilize_reference): Stabilize COMPOUND_EXPRs as a whole
9199 instead of just the operands, as the base GCC stabilize_reference does.
9200 <CALL_EXPR>: New case. Directly stabilize the call if an lvalue is not
9201 requested; otherwise fail.
9202 (addressable_p) <COMPONENT_REF>: Do not test DECL_NONADDRESSABLE_P.
9203
92042007-04-06 Thomas Quinot <quinot@adacore.com>
9205
9206 * uintp.ads, uintp.adb (UI_Div_Rem): New subprogram, extending previous
9207 implementation of UI_Div.
9208 (UI_Div): Reimplement as a call to UI_Div_Rem.
9209 (UI_Rem): Take advantage of the fact that UI_Div_Rem provides the
9210 remainder, avoiding the cost of a multiplication and a subtraction.
9211 (UI_Modular_Inverse): Take advantage of the fact that UI_Div_Rem
9212 provides both quotient and remainder in a single computation.
9213 (UI_Modular_Exponentiation, UI_Modular_Inverse): New modular arithmetic
9214 functions for uint.
9215 (UI_Modular_Inverse): Add a note that the behaviour of this subprogram
9216 is undefined if the given n is not inversible.
9217
92182007-04-06 Olivier Hainque <hainque@adacore.com>
9219
9220 * utils2.c (known_alignment): Handle COMPOUND_EXPR, COND_EXPR and
9221 BIT_AND_EXPR. Handle also VIEW_CONVERT_EXPR, as the other conversion
9222 opcodes.
9223
92242007-04-06 Eric Botcazou <botcazou@adacore.com>
9225 Olivier Hainque <hainque@adacore.com>
9226
9227 * utils.c (update_pointer_to): Make a copy of the couple of FIELD_DECLs
9228 when updating the contents of the old pointer to an unconstrained array.
9229 (end_subprog_body): Set error_gnat_node to Empty.
9230 (write_record_type_debug_info): Do not be unduly sparing with our bytes.
9231 (unchecked_convert): For subtype to base type conversions, require that
9232 the source be a subtype if it is an integer type.
9233 (builtin_decls): New global, vector of available builtin functions.
9234 (gnat_pushdecl): Add global builtin function declaration nodes to the
9235 builtin_decls list.
9236 (gnat_install_builtins): Adjust comments.
9237 (builtin_function): Set DECL_BUILTIN_CLASS and DECL_FUNCTION_CODE before
9238 calling gnat_pushdecl, so that it knows when it handed a builtin
9239 function declaration node.
9240 (builtin_decl_for): Search the builtin_decls list.
9241
92422007-04-06 Eric Botcazou <botcazou@adacore.com>
9243
9244 * s-stchop-vxworks.adb:
9245 (Stack_Check): Raise Storage_Error if the argument has wrapped around.
9246
92472007-04-06 Robert Dewar <dewar@adacore.com>
9248 Arnaud Charlet <charlet@adacore.com>
9249
9250 * a-diroro.ads: Inserted the pragma Unimplemented_Unit
9251
9252 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Ada_95 at start
9253 of files
9254 Add mention of -Sev (set initialize_scalars option from environment
9255 variable at run time) in gnatbind usage message.
9256
9257 * elists.ads, elists.adb: (Append_Unique_Elmt): New procedure
9258
9259 * fname-uf.ads: Minor comment fix
9260
9261 * osint.ads: Change pragma Elaborate to Elaborate_All
9262
9263 * par-load.adb: Add documentation.
9264
9265 * sem_cat.ads, sem_cat.adb: Minor code reorganization
9266
9267 * s-parint.ads (RCI_Locator) : Add 'Version' generic formal
9268
9269 * s-secsta.ads: Extra comments
9270
9271 * s-soflin.ads: Minor comment fixes
9272
9273 * s-stratt.ads (Block_Stream_Ops_OK): Removed.
9274
9275 * s-wchcon.ads: Minor comment addition
9276
9277 * treepr.adb: Minor change in message
9278 (Print_Name,Print_Node): Make these debug printouts more robust: print
9279 "no such..." instead of crashing on bad input.
9280
47ecd38d
RAE
92812007-03-30 Rafael Avila de Espindola <espindola@google.com>
9282
9283 * trans.c (Attribute_to_gnu): Use get_signed_or_unsigned_type
9284 instead of gnat_signed_or_unsigned_type.
9285 * utils.c (gnat_signed_or_unsigned_type): Remove.
9286 * misc.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove
9287 * gigi.h (gnat_signed_or_unsigned_type): Remove
9288
9645c3c5
RS
92892007-03-09 Roger Sayle <roger@eyesopen.com>
9290
9291 * cuintp.c (UI_To_gnu): Use fold_buildN calls instead of calling
9292 fold with the result of buildN.
9293 * decl.c (gnat_to_gnu_entity): Likewise.
9294 * trans.c (Attribute_to_gnu, gnat_to_gnu, emit_check): Likewise.
9295 * utils.c (finish_record_type, merge_sizes, max_size, convert):
9296 Likewise.
9297 * utils2.c (gnat_truthvalue_conversion, compare_arrays,
9298 nonbinary_modular_operation, build_binary_op, build_unary_op,
9299 build_cond_expr): Likewise.
9300
9301 * utils.c (convert): Use fold_build1 when casting values to void.
9302 * utils2.c (gnat_truthvalue_conversion): Use build_int_cst and
9303 fold_convert instead of convert when appropriate.
9304
c279aa90
BM
93052007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
9306
9307 * Make-lang.in: Add install-pdf target as copied from
9308 automake v1.10 rules.
9309
c2615f30
AS
93102007-02-28 Andreas Schwab <schwab@suse.de>
9311
9312 * Make-lang.in (doc/gnat_ugn_unw.texi): Depend on
9313 $(gcc_docdir)/include/gcc-common.texi and gcc-vers.texi.
9314 (doc/gnat-style.info): Likewise.
9315
7771bb62
BM
93162007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
9317
9318 * gnat-style.texi: Standardize title page.
9319 * gnat_rm.texi: Likewise.
9320 * gnat_ugn.texi: Likewise.
9321
ae19c041
MM
93222007-02-25 Mark Mitchell <mark@codesourcery.com>
9323
9324 * decl.c (annotate_value): Adjust for refactoring of tree_map
9325 hierarchy.
9326
fc8600f9
MM
93272007-02-24 Mark Mitchell <mark@codesourcery.com>
9328
9329 * decl.c (annotate_value): Adjust for refactoring of tree_map
9330 hierarchy.
9331
c0bca7e1
EB
93322007-02-21 Ed Schonberg <schonberg@adacore.com>
9333
9334 PR ada/18819
9335 * sem_ch3.adb (Create_Constrained_Components): for a subtype of an
9336 untagged derived type, add hidden components to keep discriminant
9337 layout consistent, when a given discriminant of the derived type
9338 constraints several discriminants of the parent type.
9339
9f3432b8 93402007-02-16 Eric Botcazou <ebotcazou@adacore.com>
6f7f72f9 9341 Sandra Loosemore <sandra@codesourcery.com>
9f3432b8
EB
9342
9343 * trans.c (call_to_gnu): Use build_call_list instead of build3 to
9344 build the call expression.
9345 (gnat_stabilize_reference_1): Handle tcc_vl_exp.
9346 * utils.c (max_size) <tcc_exceptional>: Delete.
9347 <tcc_vl_exp>: New case.
9348 <tcc_expression>: Delete CALL_EXPR subcase.
9349 (build_global_cdtor): Use build_call_nary instead of build3.
9350 * utils2.c (build_call_1_expr): Likewise.
9351 (build_call_2_expr): Likewise.
9352 (build_call_0_expr): Likewise.
9353 (build_call_alloc_dealloc): Likewise.
9354
8438091f
AK
93552007-02-07 Andreas Krebbel <krebbel1@de.ibm.com>
9356
9357 * raise-gcc.c (get_region_description_for, get_call_site_action_for,
ed41063a 9358 get_action_description_for): Replace _Unwind_Word with _uleb128_t
8438091f
AK
9359 and _Unwind_SWord with _sleb128_t.
9360
0802f6a2
PB
93612007-02-06 Paolo Bonzini <bonzini@gnu.org>
9362
9363 * Make-lang.in (ada/decl.o): Add gt-ada-decl.h dependency.
9364 * decl.c: Include gt-ada-decl.h.
9365 (annotate_value_cache): New.
9366 (annotate_value): Use it instead of TREE_COMPLEXITY.
9367
326f9a75
KH
93682007-02-03 Kazu Hirata <kazu@codesourcery.com>
9369
9370 * misc.c, utils2.c: Fix comment typos.
9371
cd259a98
RS
93722007-01-24 Roger Sayle <roger@eyesopen.com>
9373
9374 * decl.c (gnat_to_gnu_entity): Use TREE_OVERFLOW instead of
9375 TREE_CONSTANT_OVERFLOW.
9376 (allocatable_size_p, annotate_value): Likewise.
9377 * trans.c (gnat_to_gnu): Likewise.
9378 * utils.c (unchecked_convert): Likewise.
9379 * utils2.c (build_simple_component_ref): Likewise.
9380
5305be7e
RG
93812007-01-23 Richard Guenther <rguenther@suse.de>
9382
9383 PR bootstrap/30541
9384 * Make-lang.in: Replace invocations of gnatmake with $(GNATMAKE).
9385 (gnatboot2): Pass staged GNATMAKE instead of STAGE_PREFIX.
9386 (gnatboot3): Likewise.
9387 (GNATBIND): Do not define.
9388 * Makefile.in (GNATBIND): Do not define.
9389
2ac7cbb5
RG
93902007-01-08 Richard Guenther <rguenther@suse.de>
9391
9392 * cuintp.c (build_cst_from_int): Use built_int_cst_type.
9393 * trans.c (gnat_to_gnu): Likewise.
9394
2989d30c
GK
93952006-12-07 Geoffrey Keating <geoffk@apple.com>
9396
9397 * Makefile.in: Replace CROSS_COMPILE with CROSS_DIRECTORY_STRUCTURE.
9398 * adaint.c: Likewise.
9399
5848e34a
EB
94002006-12-05 Aldy Hernandez <aldyh@redhat.com>
9401
6f7f72f9 9402 Merge from gimple-tuples-branch:
5848e34a 9403 2006-11-02 Aldy Hernandez <aldyh@redhat.com>
6f7f72f9 9404
5848e34a
EB
9405 * ada-tree.h (lang_tree_node): Handle gimple tuples.
9406 * trans.c (gnat_gimplify_expr): Replace MODIFY_EXPR with
9407 GIMPLE_MODIFY_STMT.
9408
d3c56bc8
KH
94092006-12-02 Kazu Hirata <kazu@codesourcery.com>
9410
9411 * Makefile.in, mingw32.h, trans.c: Fix comment typos.
9412 * gnat_rm.texi, gnat_ugn.texi: Follow spelling conventions.
9413 Fix typos.
9414
9fa25ead
EB
94152006-11-17 Eric Botcazou <ebotcazou@adacore.com>
9416
9417 PR ada/27936
9418 * trans.c (add_decl_expr): Do not dynamically elaborate padded objects
9419 if the initializer takes into account the padding.
9420
f9f770a8
RG
94212006-11-11 Richard Guenther <rguenther@suse.de>
9422
9423 * trans.c (maybe_stabilize_reference): Remove handling of
9424 FIX_CEIL_EXPR, FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
9425
75c0ed05
AC
94262006-11-05 Arnaud Charlet <charlet@adacore.com>
9427
ed41063a 9428 PR ada/29707
75c0ed05
AC
9429 * s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads
9430 (To_Target_Priority): New function.
75c0ed05 9431
70198b9f
AC
94322006-10-31 Robert Dewar <dewar@adacore.com>
9433
9434 * a-taster.adb, s-traent-vms.adb, a-elchha.ads, a-elchha.adb,
9435 a-exctra.adb, ali-util.adb, exp_disp.ads, s-stalib.ads, s-traent.adb,
9436 s-addope.ads, s-addope.adb, a-rbtgso.adb, a-crbltr.ads, a-coprnu.adb,
9437 a-cgcaso.adb, a-cgarso.adb, a-cgaaso.adb, a-coormu.adb, a-ciormu.adb,
9438 a-rbtgso.ads, a-stunha.adb, a-stunha.adb, a-ciorma.adb, a-coorma.adb,
9439 a-secain.adb, a-slcain.adb, a-shcain.adb, a-stwiha.adb, a-stwiha.adb,
9440 a-strhas.adb, a-strhas.adb, a-stzhas.adb, a-stzhas.adb, a-szuzha.adb,
9441 a-chacon.adb, a-chacon.adb, a-chacon.ads, a-stboha.adb, a-swbwha.adb,
9442 a-szbzha.adb: Minor reformatting. Fix header.
9443
9444 * a-numaux-x86.adb: Add parentheses for use of unary minus
9445 * a-ngcefu.adb: Supply missing parentheses for unary minus
9446 * a-ngcoty.adb: Add parens for use of unary minus
9447 * a-ngelfu.adb: Add missing parens for unary minus
9448 * a-tifiio.adb: Add parentheses for uses of unary minus
9449
94502006-10-31 Robert Dewar <dewar@adacore.com>
9451 Bob Duff <duff@adacore.com>
9452 Ed Schonberg <schonberg@adacore.com>
9453
6f7f72f9 9454 * sem_res.adb (Resolve_Unary_Op): Add warning for use of unary minus
70198b9f
AC
9455 with multiplying operator.
9456 (Expected_Type_Is_Any_Real): New function to determine from the Parent
9457 pointer whether the context expects "any real type".
9458 (Resolve_Arithmetic_Op): Do not give an error on calls to the
9459 universal_fixed "*" and "/" operators when they are used in a context
9460 that expects any real type. Also set the type of the node to
9461 Universal_Real in this case, because downstream processing requires it
9462 (mainly static expression evaluation).
9463 Reword some continuation messages
9464 Add some \\ sequences to continuation messages
9465 (Resolve_Call): Refine infinite recursion case. The test has been
9466 sharpened to eliminate some false positives.
9467 Check for Current_Task usage now includes entry barrier, and is now a
9468 warning, not an error.
9469 (Resolve): If the call is ambiguous, indicate whether an interpretation
9470 is an inherited operation.
9471 (Check_Aggr): When resolving aggregates, skip associations with a box,
9472 which are priori correct, and will be replaced by an actual default
9473 expression in the course of expansion.
9474 (Resolve_Type_Conversion): Add missing support for conversion from
9475 a class-wide interface to a tagged type. Minor code cleanup.
9476 (Valid_Tagged_Converion): Add support for abstact interface type
9477 conversions.
9478 (Resolve_Selected_Component): Call Generate_Reference here rather than
9479 during analysis, and use May_Be_Lvalue to distinguish read/write.
9480 (Valid_Array_Conversion): New procedure, abstracted from
9481 Valid_Conversion, to incorporate accessibility checks for arrays of
9482 anonymous access types.
9483 (Valid_Conversion): For a conversion to a numeric type occurring in an
9484 instance or inlined body, no need to check that the operand type is
9485 numeric, since this has been checked during analysis of the template.
9486 Remove legacy test for scope name Unchecked_Conversion.
9487
9488 * sem_res.ads: Minor reformatting
9489
9490 * a-except.adb, a-except-2005.adb: Turn off subprogram ordering
9491 (PE_Current_Task_In_Entry_Body): New exception code
9492 (SE_Restriction_Violation): Removed, not used
9493
9494 * a-except.ads: Update comments.
9495
9496 * types.h, types.ads: Add definition for Validity_Check
9497 (PE_Current_Task_In_Entry_Body): New exception code
9498 (SE_Restriction_Violation): Removed, not used
9499
95002006-10-31 Thomas Quinot <quinot@adacore.com>
9501
9502 * g-socthi-vxworks.adb (C_Gethostbyname): Fix wrong test for returned
9503 error status.
9504
95052006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
9506 Jose Ruiz <ruiz@adacore.com>
9507
9508 * a-calend-vms.adb (Leap_Sec_Ops): Temp body for package in private
9509 part of Ada.Calendar: all subprogram raise Unimplemented.
9510 (Split_W_Offset): Temp function body, raising Unimplemented
9511
9512 * a-calend.ads, a-calend-vms.ads:
9513 Add imported variable Invalid_TZ_Offset used to designate targets unable
9514 to support time zones.
9515 (Unimplemented): Temporary function raised by the body of new
9516 subprograms below.
9517 (Leap_Sec_Ops): New package in the private part of Ada.Calendar. This
9518 unit provides handling of leap seconds and is used by the new Ada 2005
9519 packages Ada.Calendar.Arithmetic and Ada.Calendar.Formatting.
9520 (Split_W_Offset): Identical spec to that of Ada.Calendar.Split. This
9521 version returns an extra value which is the offset to UTC.
9522
9523 * a-calend.adb (Split_W_Offset): Add call to localtime_tzoff.
9524 (Leap_Sec_Ops): New body for package in private part of Ada.Calendar.
9525 (Split_W_Offset): New function body.
9526 (Time_Of): When a date is close to UNIX epoch, compute the time for
9527 that date plus one day (that amount is later substracted after
9528 executing mktime) so there are no problems with time zone adjustments.
9529
9530 * a-calend-mingw.adb: Remove Windows specific version no longer needed.
9531
9532 * a-calari.ads, a-calari.adb, a-calfor.ads, a-calfor.adb,
9533 a-catizo.ads, a-catizo.adb: New files.
9534
6f7f72f9 9535 * impunit.adb: Add new Ada 2005 entries
70198b9f
AC
9536
9537 * sysdep.c: Add external variable __gnat_invalid_tz_offset.
9538 Rename all occurences of "__gnat_localtime_r" to
9539 "__gnat_localtime_tzoff".
9540 (__gnat_localtime_tzoff for Windows): Add logic to retrieve the time
9541 zone data and calculate the GMT offset.
9542 (__gnat_localtime_tzoff for Darwin, Free BSD, Linux, Lynx and Tru64):
9543 Use the field "tm_gmtoff" to extract the GMT offset.
9544 (__gnat_localtime_tzoff for AIX, HPUX, SGI Irix and Sun Solaris): Use
9545 the external variable "timezone" to calculate the GMT offset.
9546
95472006-10-31 Arnaud Charlet <charlet@adacore.com>
9548 Jose Ruiz <ruiz@adacore.com>
9549
9550 * s-osinte-posix.adb, s-osinte-linux.ads, s-osinte-freebsd.adb,
9551 s-osinte-freebsd.ads, s-osinte-solaris-posix.ads, s-osinte-hpux.ads,
9552 s-osinte-darwin.adb, s-osinte-darwin.ads, s-osinte-lynxos-3.ads,
9553 s-osinte-lynxos-3.adb (To_Target_Priority): New function maps from
9554 System.Any_Priority to a POSIX priority on the target.
9555
9556 * system-linux-ia64.ads:
9557 Extend range of Priority types on Linux to use the whole range made
9558 available by the system.
9559
9560 * s-osinte-aix.adb, s-osinte-aix.ads (To_Target_Priority): New
9561 function maps from System.Any_Priority to a POSIX priority on the
9562 target.
9563 (PTHREAD_PRIO_PROTECT): Set real value.
9564 (PTHREAD_PRIO_INHERIT): Now a function.
9565 (SIGCPUFAIL): New signal.
9566 (Reserved): Add SIGALRM1, SIGWAITING, SIGCPUFAIL, since these signals
9567 are documented as reserved by the OS.
9568
9569 * system-aix.ads: Use the full range of priorities provided by the
9570 system on AIX.
9571
9572 * s-taprop-posix.adb: Call new function To_Target_Priority.
9573 (Set_Priority): Take into account Task_Dispatching_Policy and
9574 Priority_Specific_Dispatching pragmas when determining if Round Robin
9575 must be used for scheduling the task.
9576
9577 * system-linux-x86_64.ads, system-linux-x86.ads,
9578 system-linux-ppc.ads: Extend range of Priority types on Linux to use
9579 the whole range made available by the system.
9580
9581 * s-taprop-vms.adb, s-taprop-mingw.adb, s-taprop-irix.adb,
9582 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-hpux-dce.adb,
9583 s-taprop-lynxos.adb (Finalize_TCB): invalidate the stack-check cache
9584 when deallocating the TCB in order to avoid potential references to
9585 deallocated data.
9586 (Set_Priority): Take into account Task_Dispatching_Policy and
9587 Priority_Specific_Dispatching pragmas when determining if Round Robin
9588 or FIFO within priorities must be used for scheduling the task.
9589
9590 * s-taprop-vxworks.adb (Enter_Task): Store the user-level task id in
9591 the Thread field (to be used internally by the run-time system) and the
9592 kernel-level task id in the LWP field (to be used by the debugger).
9593 (Create_Task): Reorganize to unify the calls to taskSpawn into a single
9594 instance, and propagate the current task options to the spawned task.
9595 (Set_Priority): Take into account Priority_Specific_Dispatching pragmas.
9596 (Initialize): Set Round Robin dispatching when the corresponding pragma
9597 is in effect.
9598
95992006-10-31 Robert Dewar <dewar@adacore.com>
9600
9601 * system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
9602 system-linux-hppa.ads, system-hpux-ia64.ads,
9603 system-lynxos-ppc.ads, system-lynxos-x86.ads, system-tru64.ads,
9604 system-vxworks-sparcv9.ads, system-solaris-x86.ads,
9605 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
9606 system-vxworks-m68k.ads, system-vxworks-mips.ads, system-interix.ads,
9607 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
9608 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
9609 system-vxworks-alpha.ads, system.ads: Add pragma Warnings(Off,
9610 Default_Bit_Order) to kill constant condition warnings for references
9611 to this switch.
9612
96132006-10-31 Vincent Celier <celier@adacore.com>
9614 Eric Botcazou <ebotcazou@adacore.com>
9615
9616 * mlib-tgt-lynxos.adb, mlib-tgt-mingw.adb, mlib-tgt-tru64.adb,
9617 mlib-tgt-aix.adb, mlib-tgt-irix.adb, mlib-tgt-hpux.adb,
9618 mlib-tgt-linux.adb, mlib-tgt-solaris.adb: Use Append_To, instead of
9619 Ext_To, when building the library file name
9620
9621 * mlib-tgt-vxworks.adb: ditto.
9622 (Get_Target_Suffix): Add support for x86 targets.
9623
9624 * mlib-fil.ads, mlib-fil.adb: (Append_To): New function
9625
9626 * mlib-tgt-darwin.adb:
9627 Use Append_To, instead of Ext_To, when building the library file name
9628 (Flat_Namespace): New global variable.
9629 (No_Shared_Libgcc_Switch): Rename to No_Shared_Libgcc_Options.
9630 (Shared_Libgcc_Switch): Rename to With_Shared_Libgcc_Options.
9631 (Link_Shared_Libgcc): Delete.
9632 (Build_Dynamic_Library): Adjust for above changes.
9633 Use Opt package.
9634 (Build_Dynamic_Library): Pass -shared-libgcc if GCC 4 or later.
9635
96362006-10-31 Eric Botcazou <ebotcazou@adacore.com>
9637
9638 * s-taprop-solaris.adb: (Time_Slice_Val): Change type to Integer.
9639 (Initialize): Add type conversions required by above change.
9640
96412006-10-31 Jose Ruiz <ruiz@adacore.com>
9642
9643 * s-osinte-vxworks.ads, s-osinte-vxworks.adb:
9644 (getpid): New body for this function that uses the underlying taskIdSelf
9645 function for VxWorks 5 and VxWorks 6 in kernel mode.
9646 (unsigned_int): New type, modular to allow logical bit operations.
9647 (taskOptionsGet): New imported function.
9648
9649 * s-taspri-vxworks.ads (Private_Data): Change the type for the LWP
9650 field to be compliant with the type used by the corresponding operating
9651 system primitive.
9652
96532006-10-31 Pascal Obry <obry@adacore.com>
9654 Eric Botcazou <ebotcazou@adacore.com>
9655 Vincent Celier <celier@adacore.com>
9656
9657 * adaint.c (__gnat_get_libraries_from_registry): Call explicitly the
9658 ASCII version of the registry API. This is needed as the GNAT runtime
9659 is now UNICODE by default.
9660 Include version.h.
9661 (get_gcc_version): Do not hardcode the return value.
9662 (__gnat_file_time_name): On Windows properly set the default returned
9663 value to -1 which corresponds to Invalid_Time.
9664 (__gnat_fopen): New routine. A simple wrapper on all plateforms
9665 except on Windows where it does conversion for unicode support.
9666 (__gnat_freopen): Idem.
9667 (__gnat_locate_exec_on_path): If environment variable PATH does not
9668 exist, return a NULL pointer
9669
9670 * adaint.h: (__gnat_fopen): Declare.
9671 (__gnat_freopen): Likewise.
9672
9673 * mingw32.h (_tfreopen): Define this macro here for older MingW
9674 version.
9675 Activate the unicode support on platforms using a MingW runtime
9676 version 3.9 or newer.
9677
9678 * s-crtl.ads (fopen): Is now an import to the wrapper __gnat_freopen.
9679 This is needed for proper unicode support on Windows.
9680 (freopen): Idem.
9681
96822006-10-31 Eric Botcazou <ebotcazou@adacore.com>
9683 Nicolas Setton <setton@adacore.com>
9684 Olivier Hainque <hainque@adacore.com>
9685 Gary Dismukes <dismukes@adacore.com>
9686
9687 * gigi.h: (tree_code_for_record_type): Declare.
9688 (add_global_renaming_pointer): Rename to record_global_renaming_pointer.
9689 (get_global_renaming_pointers): Rename to
9690 invalidate_global_renaming_pointers.
9691 (static_ctors): Delete.
9692 (static_dtors): Likewise.
9693 (gnat_write_global_declarations): Declare.
9694 (create_var_decl): Adjust descriptive comment to indicate that the
9695 subprogram may return a CONST_DECL node.
9696 (create_true_var_decl): Declare new function, similar to
9697 create_var_decl but forcing the creation of a VAR_DECL node.
9698 (get_global_renaming_pointers): Declare.
9699 (add_global_renaming_pointer): Likewise.
9700
9701 * ada-tree.h (DECL_READONLY_ONCE_ELAB): New macro.
9702
9703 * decl.c (gnat_to_gnu_entity) <case E_Function>: Don't copy the type
9704 tree before setting TREE_ADDRESSABLE for by-reference return mechanism
9705 processing.
9706 (gnat_to_gnu_entity): Remove From_With_Type from computation for
9707 imported_p.
9708 <E_Access_Type>: Use the Non_Limited_View as the full view of the
9709 designated type if the pointer comes from a limited_with clause. Make
9710 incomplete designated type if it is in the main unit and has a freeze
9711 node.
9712 <E_Incomplete_Type>: Rework to treat Non_Limited_View, Full_View, and
9713 Underlying_Full_View similarly. Return earlier if the full view already
9714 has an associated tree.
9715 (gnat_to_gnu_entity) <E_Record_Type>: Restore comment.
9716 (gnat_to_gnu_entity) <E_Record_Type>: Do not use a dummy type.
9717 (gnat_to_gnu_entity) <E_Variable>: Set TYPE_REF_CAN_ALIAS_ALL on the
9718 reference type built for objects with an address clause.
9719 Use create_true_var_decl with const_flag set for
9720 DECL_CONST_CORRESPONDING_VARs, ensuring a VAR_DECL is created with
9721 TREE_READONLY set.
9722 (gnat_to_gnu_entity, case E_Enumeration_Type): Set TYPE_NAME
9723 for Character and Wide_Character types. This info is read by the
9724 dwarf-2 writer, and is needed to be able to use the command "ptype
9725 character" in the debugger.
9726 (gnat_to_gnu_entity): When generating a type representing
9727 a Character or Wide_Character type, set the flag TYPE_STRING_FLAG,
9728 so that debug writers can distinguish it from ordinary integers.
9729 (elaborate_expression_1): Test the DECL_READONLY_ONCE_ELAB flag in
9730 addition to TREE_READONLY to assert the constantness of variables for
9731 elaboration purposes.
9732 (gnat_to_gnu_entity, subprogram cases): Change loops on formal
9733 parameters to call new Einfo function First_Formal_With_Extras.
9734 (gnat_to_gnu_entity): In type_annotate mode, replace a discriminant of a
9735 protected type with its corresponding discriminant, to obtain a usable
9736 declaration
9737 (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Be prepared
9738 for a multiple elaboration of the "equivalent" type.
9739 (gnat_to_gnu_entity): Adjust for renaming of add_global_renaming_pointer
9740 into record_global_renaming_pointer.
9741 (gnat_to_gnu_entity) <E_Array_Type>: Do not force
9742 TYPE_NONALIASED_COMPONENT to 0 if the element type is an aggregate.
9743 <E_Array_Subtype>: Likewise.
9744 (gnat_to_gnu_entity) <E_Incomplete_Subtype>: Add support for regular
9745 incomplete subtypes and incomplete subtypes of incomplete types visible
9746 through a limited with clause.
9747 (gnat_to_gnu_entity) <E_Array_Subtype>: Take into account the bounds of
9748 the base index type for the maximum size of the array only if they are
9749 constant.
9750 (gnat_to_gnu_entity, renaming object case): Do not wrap up the
9751 expression into a SAVE_EXPR if stabilization failed.
9752
9753 * utils.c (create_subprog_decl): Turn TREE_ADDRESSABLE on the type of
9754 a result decl into DECL_BY_REFERENCE on this decl, now what is expected
9755 by lower level compilation passes.
9756 (gnat_genericize): New function, lowering a function body to GENERIC.
9757 Turn the type of RESULT_DECL into a real reference type if the decl
9758 has been marked DECL_BY_REFERENCE, and adjust references to the latter
9759 accordingly.
9760 (gnat_genericize_r): New function. Tree walking callback for
9761 gnat_genericize.
9762 (convert_from_reference, is_byref_result): New functions. Helpers for
9763 gnat_genericize_r.
9764 (create_type_decl): Call gnat_pushdecl before calling
9765 rest_of_decl_compilation, to make sure that field TYPE_NAME of
9766 type_decl is properly set before calling the debug information writers.
9767 (write_record_type_debug_info): The heuristics which compute the
9768 alignment of a field in a variant record might not be accurate. Add a
9769 safety test to make sure no alignment is set to a smaller value than
9770 the alignment of the field type.
9771 (make_dummy_type): Use the Non_Limited_View as the underlying type if
9772 the type comes from a limited_with clause. Do not loop on the full view.
9773 (GET_GNU_TREE, SET_GNU_TREE, PRESENT_GNU_TREE): New macros.
9774 (dummy_node_table): New global variable, moved from decl.c.
9775 (GET_DUMMY_NODE, SET_DUMMY_NODE, PRESENT_DUMMY_NODE): New macros.
9776 (save_gnu_tree): Use above macros.
9777 (get_gnu_tree): Likewise.
9778 (present_gnu_tree): Likewise.
9779 (init_dummy_type): New function, moved from decl.c. Use above macros.
9780 (make_dummy_type): Likewise.
9781 (tree_code_for_record_type): New function extracted from make_dummy_type
9782 (init_gigi_decls): Set DECL_IS_MALLOC on gnat_malloc.
9783 (static_ctors): Change it to a vector, make static.
9784 (static_dtors): Likewise.
9785 (end_subprog_body): Adjust for above change.
9786 (build_global_cdtor): Moved from trans.c.
9787 (gnat_write_global_declarations): Emit global constructor and
9788 destructor, and call cgraph_optimize before emitting debug info for
9789 global declarations.
9790 (global_decls): New global variable.
9791 (gnat_pushdecl): Store the global declarations in global_decls, for
9792 later use.
9793 (gnat_write_global_declarations): Emit debug information for global
9794 declarations.
9795 (create_var_decl_1): Former create_var_decl, with an extra argument to
9796 state whether the creation of a CONST_DECL is allowed.
9797 (create_var_decl): Behavior unchanged. Now a wrapper around
9798 create_var_decl_1 allowing CONST_DECL creation.
9799 (create_true_var_decl): New function, similar to create_var_decl but
9800 forcing the creation of a VAR_DECL node (CONST_DECL not allowed).
9801 (create_field_decl): Do not always mark the field as addressable
9802 if its type is an aggregate.
9803 (global_renaming_pointers): New static variable.
9804 (add_global_renaming_pointer): New function.
9805 (get_global_renaming_pointers): Likewise.
9806
9807 * misc.c (gnat_dwarf_name): New function.
9808 (LANG_HOOKS_DWARF_NAME): Define to gnat_dwarf_name.
9809 (gnat_post_options): Add comment about structural alias analysis.
9810 (gnat_parse_file): Do not call cgraph_optimize here.
9811 (LANG_HOOKS_WRITE_GLOBALS): Define to gnat_write_global_declarations.
9812
9813 * trans.c (process_freeze_entity): Don't abort if we already have a
9814 non dummy GCC tree for a Concurrent_Record_Type, as it might
9815 legitimately have been elaborated while processing the associated
9816 Concurrent_Type prior to this explicit freeze node.
9817 (Identifier_to_gnu): Do not make a variable referenced in a SJLJ
9818 exception handler volatile if it is of variable size.
9819 (process_type): Remove bypass for types coming from a limited_with
9820 clause.
9821 (call_to_gnu): When processing the copy-out of a N_Type_Conversion GNAT
9822 actual, convert the corresponding gnu_actual to the real destination
9823 type when necessary.
9824 (add_decl_expr): Set the DECL_READONLY_ONCE_ELAB flag on variables
9825 originally TREE_READONLY but whose elaboration cannot be performed
9826 statically.
9827 Part of fix for F504-021.
9828 (tree_transform, subprogram cases): Change loops on formal parameters to
9829 call new Einfo function First_Formal_With_Extras.
9830 (gnat_to_gnu) <N_Op_Shift_Right_Arithmetic>: Ignore constant overflow
9831 stemming from type conversion for the lhs.
9832 (Attribute_to_gnu) <Attr_Alignment>: Also divide the alignment by the
9833 number of bits per unit for components of records.
9834 (gnat_to_gnu) <N_Code_Statement>: Mark operands addressable if needed.
9835 (Handled_Sequence_Of_Statements_to_gnu): Register the cleanup associated
9836 with At_End_Proc after the SJLJ EH cleanup.
9837 (Compilation_Unit_to_gnu): Call elaborate_all_entities only on the main
9838 compilation unit.
9839 (elaborate_all_entities): Do not retest type_annotate_only.
9840 (tree_transform) <N_Abstract_Subprogram_Declaration>: Process the
9841 result type of an abstract subprogram, which may be an itype associated
9842 with an anonymous access result (related to AI-318-02).
9843 (build_global_cdtor): Move to utils.c.
9844 (Case_Statement_to_gnu): Avoid adding the choice of a when statement if
9845 this choice is not a null tree nor an integer constant.
9846 (gigi): Run unshare_save_expr via walk_tree_without_duplicates
9847 on the body of elaboration routines instead of mark_unvisited.
9848 (add_stmt): Do not mark the tree.
9849 (add_decl_expr): Tweak comment.
9850 (mark_unvisited): Delete.
9851 (unshare_save_expr): New static function.
9852 (call_to_gnu): Issue an error when making a temporary around a
9853 procedure call because of non-addressable actual parameter if the
9854 type of the formal is by_reference.
9855 (Compilation_Unit_to_gnu): Invalidate the global renaming pointers
9856 after building the elaboration routine.
9857
98582006-10-31 Bob Duff <duff@adacore.com>
9859
9860 * a-filico.adb (Finalize(List_Controller)): Mark the finalization list
9861 as finalization-started, so we can raise Program_Error on 'new'.
9862
9863 * s-finimp.adb: Raise Program_Error on 'new' if finalization of the
9864 collection has already started.
9865
9866 * s-finimp.ads (Collection_Finalization_Started): Added new special
9867 flag value for indicating that a collection's finalization has started.
9868
9869 * s-tassta.adb (Create_Task): Raise Program_Error on an attempt to
9870 create a task whose master has already waited for dependent tasks.
9871
98722006-10-31 Robert Dewar <dewar@adacore.com>
9873
9874 * lib.adb, lib.ads: (In_Predefined_Unit): New functions
9875
9876 * a-finali.ads, a-ngcoty.ads, a-strbou.ads, a-stream.ads, a-strmap.ads,
9877 a-strunb.ads, a-stwibo.ads, a-stwima.ads, a-stwiun.ads, a-taside.ads,
9878 a-coorse.ads, a-convec.ads, a-coinve.ads, a-cohama.ads, a-ciorse.ads,
9879 a-cihama.ads, a-cihase.ads, a-cohase.ads, a-ciorma.ads, a-coorma.ads,
9880 a-ciormu.ads, a-coormu.ads, a-stzbou.ads, a-stzmap.ads, a-stzunb.ads,
9881 a-except-2005.ads: Add pragma Preelaborable_Warning
9882
98832006-10-31 Robert Dewar <dewar@adacore.com>
9884 Jose Ruiz <ruiz@adacore.com>
9885
9886 * a-dispat.ads, a-dispat.adb, a-diroro.ads, a-diroro.adb: New files.
9887
9888 * ali.adb (Get_Name): Properly handle scanning of wide character names
9889 encoded with brackets notation.
9890 (Known_ALI_Lines): Add S lines to this list.
9891 (Scan_ALI): Acquire S (priority specific dispatching) lines.
9892 New flag Elaborate_All_Desirable in unit table
9893
9894 * ali.ads (Priority_Specific_Dispatching): Add this range of
9895 identifiers to be used for Priority_Specific_Dispatching table entries.
9896 (ALIs_Record): Add First_Specific_Dispatching and
9897 Last_Specific_Dispatching that point to the first and last entries
9898 respectively in the priority specific dispatching table for this unit.
9899 (Specific_Dispatching): Add this table for storing each S (priority
9900 specific dispatching) line encountered in the input ALI file.
9901 New flag Elaborate_All_Desirable in unit table
9902
9903 * bcheck.adb: (Check_Configuration_Consistency): Add call to
9904 Check_Consistent_Dispatching_Policy.
9905 (Check_Consistent_Dispatching_Policy): Add this procedure in charge of
9906 verifying that the use of Priority_Specific_Dispatching,
9907 Task_Dispatching_Policy, and Locking_Policy is consistent across the
9908 partition.
9909
9910 * bindgen.adb: (Public_Version_Warning): function removed.
9911 (Set_PSD_Pragma_Table): Add this procedure in charge of getting the
9912 required information from ALI files in order to initialize the table
9913 containing the specific dispatching policy.
9914 (Gen_Adainit_Ada): Generate the variables required for priority specific
9915 dispatching entries (__gl_priority_specific_dispatching and
9916 __gl_num_specific_dispatching).
9917 (Gen_Adainit_C): Generate the variables required for priority specific
9918 dispatching entries (__gl_priority_specific_dispatching and
9919 __gl_num_specific_dispatching).
9920 (Gen_Output_File): Acquire settings for Priority_Specific_Dispatching
9921 pragma entries.
9922 (Gen_Restrictions_String_1, Gen_Restrictions_String_2): Removed.
9923 (Gen_Restrictions_Ada, Gen_Restrictions_C, Set_Boolean): New procedures.
9924 (Tab_To): Removed.
9925 (Gen_Output_File_Ada/_C): Set directly __gl_xxx variables instead of
9926 a call to gnat_set_globals.
9927 Generate a string containing settings from
9928 Priority_Specific_Dispatching pragma entries.
9929 (Gen_Object_Files_Options): Do not include the runtime libraries when
9930 pragma No_Run_Time is specified.
9931
9932 * init.c (__gnat_install_handler, case FreeBSD): Use SA_SIGINFO, for
9933 consistency with s-intman-posix.adb.
9934 (__gnat_error_handler, case FreeBSD): Account for the fact that the
9935 handler is installed with SA_SIGINFO.
9936 (__gnat_adjust_context_for_raise, FreeBSD case): New function for
9937 FreeBSD ZCX support, copied from Linux version.
9938 Add MaRTE-specific definitions for the linux target. Redefine sigaction,
9939 sigfillset, and sigemptyset so the routines defined by MaRTE.
9940 (__gl_priority_specific_dispatching): Add this variable that stores the
9941 string containing priority specific dispatching policies in the
9942 partition.
9943 (__gl_num_specific_dispatching): Add this variable that indicates the
9944 highest priority for which a priority specific dispatching pragma
9945 applies.
9946 (__gnat_get_specific_dispatching): Add this routine that returns the
9947 priority specific dispatching policy, as set by a
9948 Priority_Specific_Dispatching pragma appearing anywhere in the current
9949 partition. The input argument is the priority number, and the result
9950 is the upper case first character of the policy name.
9951 (__gnat_set_globals): Now a dummy function.
9952 (__gnat_handle_vms_condition): Feed adjust_context_for_raise with
9953 mechargs instead of sigargs, as the latter can be retrieved from the
9954 former and sigargs is not what we want on ia64.
9955 (__gnat_adjust_context_for_raise, alpha-vms): Fetch sigargs from the
9956 mechargs argument.
9957 (__gnat_adjust_context_for_raise, ia64-vms): New function.
9958 (tasking_error): Remove unused symbol.
9959 (_abort_signal): Move this symbol to the IRIX specific part since this
9960 is the only target that uses this definition.
9961 (Check_Abort_Status): Move this symbol to the IRIX specific part since
9962 this is the only target that uses this definition.
9963 (Lock_Task): Remove unused symbol.
9964 (Unlock_Task): Remove unused symbol.
9965
9966 * lib-writ.adb (Write_ALI): Output new S lines for
9967 Priority_Specific_Dispatching pragmas.
9968 Implement new flag BD for elaborate body desirable
9969
9970 * lib-writ.ads: Document S lines for Priority Specific Dispatching.
9971 (Specific_Dispatching): Add this table for storing the entries
9972 corresponding to Priority_Specific_Dispatching pragmas.
9973 Document new BD flag for elaborate body desirable
9974
9975 * par-prag.adb (Prag): Add Priority_Specific_Dispatching to the list
9976 of known pragmas.
9977
99782006-10-31 Javier Miranda <miranda@adacore.com>
9979
9980 * a-tags.ads, a-tags.adb:
9981 (Predefined_DT): New function that improves readability of the code.
9982 (Get_Predefined_Prim_Op_Address, Set_Predefined_Prim_Op_Address,
9983 Inherit_DT): Use the new function Predefined_DT to improve code
9984 readability.
9985 (Register_Interface_Tag): Update assertion.
9986 (Set_Interface_Table): Update assertion.
9987 (Interface_Ancestor_Tags): New subprogram required to implement AI-405:
9988 determining progenitor interfaces in Tags.
9989 (Inherit_CPP_DT): New subprogram.
9990
6f7f72f9 9991 * exp_disp.adb (Expand_Interface_Thunk): Suppress checks during the
70198b9f 9992 analysis of the thunk code.
6f7f72f9
EB
9993 (Expand_Interface_Conversion): Handle run-time conversion of
9994 access to class wide types.
70198b9f
AC
9995 (Expand_Dispatching_Call): When generating the profile for the
9996 subprogram itype for a dispatching operation, properly terminate the
9997 formal parameters chaind list (set the Next_Entity of the last formal
9998 to Empty).
9999 (Collect_All_Interfaces): Removed. This routine has been moved to
10000 sem_util and renamed as Collect_All_Abstract_Interfaces.
10001 (Set_All_DT_Position): Hidden entities associated with abstract
10002 interface primitives are not taken into account in the check for
10003 3.9.3(10); this check is done with the aliased entity.
10004 (Make_DT, Set_All_DT_Position): Enable full ABI compatibility for
10005 interfacing with CPP by default.
10006 (Expand_Interface_Conversion): Add missing support for static conversion
10007 from an interface to a tagged type.
10008 (Collect_All_Interfaces): Add new out formal containing the list of
10009 abstract interface types to cleanup the subprogram Make_DT.
10010 (Make_DT): Update the code to generate the table of interfaces in case
10011 of abstract interface types.
10012 (Is_Predefined_Dispatching_Alias): New function that returns true if
10013 a primitive is not a predefined dispatching primitive but it is an
10014 alias of a predefined dispatching primitive.
10015 (Make_DT): If the ancestor of the type is a CPP_Class and we are
10016 compiling under full ABI compatibility mode we avoid the generation of
10017 calls to run-time services that fill the dispatch tables because under
10018 this mode we currently inherit the dispatch tables in the IP subprogram.
10019 (Write_DT): Emit an "is null" indication for a null procedure primitive.
10020 (Expand_Interface_Conversion): Use an address as the type of the formal
10021 of the internally built function that handles the case in which the
10022 target type is an access type.
10023
100242006-10-31 Robert Dewar <dewar@adacore.com>
10025
10026 * binde.adb (Better_Choice, Worse_Choice): Implement new preferences.
10027
100282006-10-31 Robert Dewar <dewar@adacore.com>
10029
10030 * bindusg.ads, bindusg.adb:
10031 Change to package and rename procedure as Display, which
10032 now ensures that it only outputs usage information once.
10033
100342006-10-31 Jose Ruiz <ruiz@adacore.com>
10035
10036 * cal.c: Use the header sys/time.h for VxWorks 6.2 or greater when
10037 using RTPs.
10038
10039 * mkdir.c: Use a different version of mkdir for VxWorks 6.2 or greater
10040 when using RTPs.
10041
100422006-10-31 Robert Dewar <dewar@adacore.com>
10043 Ed Schonberg <schonberg@adacore.com>
10044
10045 * treepr.adb: Use new subtype N_Membership_Test
10046
6f7f72f9
EB
10047 * checks.ads, checks.adb: Add definition for Validity_Check
10048 (Range_Or_Validity_Checks_Suppressed): New function
10049 (Ensure_Valid): Test Validity_Check suppressed
10050 (Insert_Valid_Check): Test Validity_Check suppressed
10051 (Insert_Valid_Check): Preserve Do_Range_Check flag
70198b9f
AC
10052 (Validity_Check_Range): New procedure
10053 (Expr_Known_Valid): Result of membership test is always valid
10054 (Selected_Range_Checks): Range checks cannot be applied to discriminants
10055 by themselves. Disabling those checks must also be done for task types,
10056 where discriminants may be used for the bounds of entry families.
10057 (Apply_Address_Clause_Check): Remove side-effects if address expression
10058 is non-static and is not the name of a declared constant.
10059 (Null_Exclusion_Static_Checks): Extend to handle Function_Specification.
10060 Code cleanup and new error messages.
10061 (Enable_Range_Check): Test for some cases of suppressed checks
10062 (Generate_Index_Checks): Suppress index checks if index checks are
10063 suppressed for array object or array type.
10064 (Apply_Selected_Length_Checks): Give warning for compile-time detected
10065 length check failure, even if checks are off.
10066 (Ensure_Valid): Do not generate a check on an indexed component whose
10067 prefix is a packed boolean array.
10068 * checks.adb: (Alignment_Checks_Suppressed): New function
10069 (Apply_Address_Clause_Check): New procedure, this is a completely
10070 rewritten replacement for Apply_Alignment_Check
10071 (Get_E_Length/Get_E_First_Or_Last): Add missing barrier to ensure that
10072 we request a discriminal value only in case of discriminants.
10073 (Apply_Discriminant_Check): For Ada_05, only call Get_Actual_Subtype for
10074 assignments where the target subtype is unconstrained and the target
10075 object is a parameter or dereference (other aliased cases are known
10076 to be unconstrained).
10077
100782006-10-31 Robert Dewar <dewar@adacore.com>
10079
10080 * clean.adb, gnatname.adb, gnatsym.adb, prep.adb, prep.ads,
10081 prepcomp.adb, prj.ads, prj-strt.adb, sem_maps.ads,
10082 vms_conv.adb: Fix bad table increment values (much too small)
10083
10084 * table.adb (Realloc): Make sure we get at least some new elements
10085 Defends against silly small values for table increment
10086
100872006-10-31 Robert Dewar <dewar@adacore.com>
10088 Ed Schonberg <schonberg@adacore.com>
10089 Bob Duff <duff@adacore.com>
10090
10091 * einfo.ads, einfo.adb (Obsolescent_Warning): Now defined on all
10092 entities. Move other fields around to make this possible
10093 (Is_Derived_Type): Add missing call to Is_Type.
10094 (Extra_Formals): New function for subprograms, entries, subprogram
10095 types.
10096 (Set_Extra_Formals): New procedure for subprograms, entries, subp types.
10097 (First_Formal_With_Extras): New function for subprogs, entries, subp
10098 types.
10099 (Write_Field28_Name): New procedure for node display of "Extra_Formals".
10100 Add node information for E_Return_Statement.
10101 (Elaborate_Body_Desirable): New flag
10102 (Is_Return_By_Reference_Type): Rename Is_Return_By_Reference_Type
10103 to be Is_Inherently_Limited_Type, because return-by-reference has
10104 no meaning in Ada 2005.
10105 (E_Return_Statement): New entity kind.
10106 (Return_Applies_To): Field of E_Return_Statement.
10107 (Is_Return_Object): New flag in object entities.
10108 (Is_Dynamic_Scope): Make it True for E_Return_Statement.
10109 (Must_Have_Preelab_Init): New flag
10110 (Known_To_Have_Preelab_Init): New flag
10111 (Is_Formal_Object): Move from Sem_Ch8 body to Einfo
10112 (Is_Visible_Formal): New flag on entities in formal packages.
10113 (Low_Bound_Known): New flag
10114 (Non_Limited_View, Set_Non_Limited_View): Add membership test agains
10115 Incomplete_Kind.
10116 (Write_Field17_Name): Correct spelling of Non_Limited_View. Add name
10117 output when Id is an incomplete subtype.
10118
101192006-10-31 Robert Dewar <dewar@adacore.com>
10120
10121 * errout.ads, errout.adb (Finalize): Implement switch -gnatd.m
10122 Avoid abbreviation Creat
10123 (Finalize): List all sources in extended mail source if -gnatl
10124 switch is active.
10125 Suppress copyright notice to file in -gnatl=f mode if -gnatd7 set
10126 (Finalize): Implement new -gnatl=xxx switch to output listing to file
10127 (Set_Specific_Warning_On): New procedure
10128 (Set_Specific_Warning_Off): New procedure
10129 Add implementation of new insertion \\
10130 (Error_Msg_Internal): Add handling for Error_Msg_Line_Length
10131 (Unwind_Internal_Type): Improve report on anonymous access_to_subprogram
10132 types.
10133 (Error_Msg_Internal): Make sure that we set Last_Killed to
10134 True when a message from another package is suppressed.
10135 Implement insertion character ~ (insert string)
10136 (First_Node): Minor adjustments to get better placement.
10137
10138 * frontend.adb:
10139 Implement new -gnatl=xxx switch to output listing to file
10140
10141 * gnat1drv.adb:
10142 Implement new -gnatl=xxx switch to output listing to file
10143
6f7f72f9 10144 * opt.ads: (Warn_On_Questionable_Missing_Paren): New switch
70198b9f
AC
10145 (Commands_To_Stdout): New flag
10146 Implement new -gnatl=xxx switch to output listing to file
10147 New switch Dump_Source_Text
10148 (Warn_On_Deleted_Code): New warning flag for -gnatwt
10149 Define Error_Msg_Line_Length
10150 (Warn_On_Assumed_Low_Bound): New switch
10151
10152 * osint.ads, osint.adb
10153 (Normalize_Directory_Name): Fix bug.
10154 Implement new -gnatl=xxx switch to output listing to file
10155 (Concat): Removed, replaced by real concatenation
10156 Make use of concatenation now allowed in compiler
10157 (Executable_Prefix.Get_Install_Dir): First get the full path, so that
10158 we find the 'lib' or 'bin' directory even when the tool has been
10159 invoked with a relative path.
10160 (Executable_Name): New function taking string parameters.
10161
10162 * osint-c.ads, osint-c.adb:
10163 Implement new -gnatl=xxx switch to output listing to file
10164
10165 * sinput-d.adb: Change name Creat_Debug_File to Create_Debug_File
10166
10167 * switch-c.adb:
10168 Implement new -gnatl=xxx switch to output listing to file
10169 Recognize new -gnatL switch
10170 (no longer keep in old warning about old style usage)
10171 Use concatenation to simplify code
10172 Recognize -gnatjnn switch
10173 (Scan_Front_End_Switches): Clean up handling of -gnatW
10174 (Scan_Front_End_Switches): Include Warn_On_Assumed_Low_Bound for -gnatg
10175
101762006-10-31 Robert Dewar <dewar@adacore.com>
10177
10178 * erroutc.ads, erroutc.adb (Set_Specific_Warning_On): New procedure
10179 (Set_Specific_Warning_Off): New procedure
10180 (Warning_Specifically_Suppressed): New function
10181 (Validate_Specific_Warnings): New procedure
10182 (Output_Msg_Text): Complete rewrite to support -gnatjnn
10183
10184 * err_vars.ads: Implement insertion character ~ (insert string)
10185
101862006-10-31 Bob Duff <duff@adacore.com>
10187 Ed Schonberg <schonberg@adacore.com>
10188
10189 * exp_aggr.adb (Build_Record_Aggr_Code): For extension aggregates, if
10190 the parent part is a build-in-place function call, generate assignments.
10191 (Expand_Record_Aggregate): Call Convert_To_Assignments if any components
10192 are build-in-place function calls.
10193 (Replace_Self_Reference): New subsidiary of
10194 Make_OK_Assignment_Statement, to replace an access attribute that is a
10195 self-reference into an access to the appropriate component of the
10196 target object. Generalizes previous mechanism to handle self-references
10197 nested at any level.
10198 (Is_Self_Referential_Init): Remove, not needed.
10199 (Is_Self_Referential_Init): New predicate to simplify handling of self
10200 referential components in record aggregates.
10201 (Has_Default_Init_Comps, Make_OK_Assignment_Statement): Add guard to
10202 check for presence of entity before checking for self-reference.
10203 (Has_Default_Init_Comps): Return True if a component association is a
10204 self-reference to the enclosing type, which can only come from a
10205 default initialization.
10206 (Make_OK_Assignment_Statement): If the expression is of the form
10207 Typ'Acc, where Acc is an access attribute, the expression comes from a
10208 default initialized self-referential component.
10209 (Build_Record_Aggr_Code): If the type of the aggregate is a tagged type
10210 that has been derived from several abstract interfaces we must also
10211 initialize the tags of the secondary dispatch tables.
10212
102132006-10-31 Ed Schonberg <schonberg@adacore.com>
10214 Thomas Quinot <quinot@adacore.com>
10215 Javier Miranda <miranda@adacore.com>
10216 Robert Dewar <dewar@adacore.com>
6f7f72f9
EB
10217
10218 * exp_attr.adb:
10219 (Expand_Access_To_Protected_Op): If the context indicates that an access
10220 to a local operation may be transfered outside of the object, create an
10221 access to the wrapper operation that must be used in an external call.
70198b9f
AC
10222 (Expand_N_Attribute_Reference, case Attribute_Valid): For the AAMP
10223 target, pass the Valid attribute applied to a floating-point prefix on
10224 to the back end without expansion.
10225 (Storage_Size): Use the new run-time function Storage_Size to retrieve
10226 the allocated storage when it is specified by a per-object expression.
10227 (Expand_N_Attribute_Reference): Add case for Attribute_Stub_Type.
10228 Nothing to do here, the attribute has been rewritten during semantic
10229 analysis.
10230 (Expand_Attribute_Reference): Handle expansion of the new Priority
10231 attribute
10232 (Find_Fat_Info): Handle case of universal real
10233 (Expand_Access_To_Protected_Op): Fix use of access to protected
10234 subprogram from inside the body of a protected entry.
10235 (Expand_Access_To_Protected_Op): Common procedure for the expansion of
10236 'Access and 'Unrestricted_Access, to transform the attribute reference
10237 into a fat pointer.
10238 (Is_Constrained_Aliased_View): New predicate to help determine whether a
10239 subcomponent's enclosing variable is aliased with a constrained subtype.
10240 (Expand_N_Attribute_Reference, case Attribute_Constrained): For Ada_05,
10241 test Is_Constrained_Aliased_View rather than Is_Aliased_View, because
10242 an aliased prefix must be known to be constrained in order to use True
10243 for the attribute value, and now it's possible for some aliased views
10244 to be unconstrained.
10245
102462006-10-31 Robert Dewar <dewar@adacore.com>
10247
10248 * exp_ch2.adb: Change Is_Lvalue to May_Be_Lvalue
10249 (Expand_Entity_Reference): Correct error of not handling subprogram
10250 formals in current_value processing.
10251
102522006-10-31 Javier Miranda <miranda@adacore.com>
10253 Robert Dewar <dewar@adacore.com>
10254 Ed Schonberg <schonberg@adacore.com>
10255 Gary Dismukes <dismukes@adacore.com>
10256
6f7f72f9 10257 * exp_ch3.ads, exp_ch3.adb (Expand_N_Object_Declaration): Do not
70198b9f
AC
10258 register in the final list objects containing class-wide interfaces;
10259 otherwise we incorrectly register the tag of the interface in the final
10260 list.
6f7f72f9
EB
10261 (Make_Controlling_Function_Wrappers): Add missing barrier to do not
10262 generate the wrapper if the parent primitive is abstract. This is
10263 required to report the correct error message.
10264 (Expand_N_Subtype_Indication): Do validity checks on range
70198b9f
AC
10265 (Clean_Task_Names): If an initialization procedure includes a call to
10266 initialize a task (sub)component, indicate that the procedure will use
10267 the secondary stack.
10268 (Build_Init_Procedure, Init_Secondary_Tags): Enable full ABI
10269 compatibility for interfacing with CPP by default.
10270 (Expand_N_Object_Declaration): Only build an Adjust call when the
10271 object's type is a nonlimited controlled type.
10272 * exp_ch3.adb: Add with and use of Exp_Ch6.
10273 (Expand_N_Object_Declaration): Check for object initialization that is a
10274 call to build-in-place function and apply Make_Build_In_Place_Call_In_
10275 Object_Declaration to the call.
10276 (Freeze_Type): When the designated type of an RACW was not frozen at the
10277 point where the RACW was declared, validate the primitive operations
10278 with respect to E.2.2(14) when it finally is frozen.
10279 (Build_Initialization_Call,Expand_Record_Controller): Rename
10280 Is_Return_By_Reference_Type to be Is_Inherently_Limited_Type, because
10281 return-by-reference has no meaning in Ada 2005.
10282 (Init_Secondary_Tags): Add missing call to Set_Offset_To_Top
10283 to register tag of the immediate ancestor interfaces in the
10284 run-time structure.
10285 (Init_Secondary_Tags): Moved to the specification to allow the
10286 initialization of extension aggregates with abstract interfaces.
10287 (Build_Master_Renaming): Make public, for use by function declarations
10288 whose return type is an anonymous access type.
10289 (Freeze_Record_Type): Replace call to Insert_List_Before by call to
10290 Insert_List_Before_And_Analyze after the generation of the specs
10291 associated with null procedures.
10292 (Expand_Tagged_Root): Update documentation in its specification.
10293 (Init_Secondary_Tags): Update documentation.
10294 (Build_Init_Procedure): If we are compiling under CPP full ABI compa-
10295 tibility mode and the immediate ancestor is a CPP_Pragma tagged type
10296 then generate code to inherit the contents of the dispatch table
10297 directly from the ancestor.
10298 (Expand_Record_Controller): Insert controller component after tags of
10299 implemented interfaces.
10300 (Freeze_Record_Type): Call new procedure Make_Null_Procedure_Specs to
10301 create null procedure overridings when null procedures are inherited
10302 from interfaces.
10303 (Make_Null_Procedure_Specs): New procedure to generate null procedure
10304 declarations for overriding null primitives inherited from interfaces.
10305 (Is_Null_Interface_Procedure): New function in
10306 Make_Null_Procedure_Specs.
10307 (Make_Predefined_Primitive_Specs/Predefined_Primitive_Bodies): If the
10308 immediate ancestor of a tagged type is an abstract interface type we
10309 must generate the specification of the predefined primitives associated
10310 with controlled types (because the dispatch table of the ancestor is
10311 null and hence these entries cannot be inherited). This is required to
10312 elaborate well the dispatch table.
10313
103142006-10-31 Javier Miranda <miranda@adacore.com>
10315 Ed Schonberg <schonberg@adacore.com>
10316 Bob Duff <duff@adacore.com>
10317 Gary Dismukes <dismukes@adacore.com>
10318 Robert Dewar <dewar@adacore.com>
6f7f72f9
EB
10319
10320 * exp_ch4.adb (Expand_N_Type_Conversion): Handle missing interface type
70198b9f 10321 conversion.
6f7f72f9 10322 (Expand_N_In): Do validity checks on range
70198b9f
AC
10323 (Expand_Selected_Component): Use updated for of Denotes_Discriminant.
10324 (Expand_N_Allocator): For "new T", if the object is constrained by
10325 discriminant defaults, allocate the right amount of memory, rather than
10326 the maximum for type T.
10327 (Expand_Allocator_Expression): Suppress the call to Remove_Side_Effects
10328 when the allocator is initialized by a build-in-place call, since the
10329 allocator is already rewritten as a reference to the function result,
10330 and this prevents an unwanted duplication of the function call.
10331 Add with and use of Exp_Ch6.
10332 (Expand_Allocator_Expresssion): Check for an allocator whose expression
10333 is a call to build-in-place function and apply
10334 Make_Build_In_Place_Call_In_Allocator to the call (for both tagged and
10335 untagged designated types).
10336 (Expand_N_Unchecked_Type_Conversion): Do not do integer literal
10337 optimization if source or target is biased.
10338 (Expand_N_Allocator): Add comments for case of an allocator within a
10339 function that returns an anonymous access type designating tasks.
10340 (Expand_N_Allocator): apply discriminant checks for access
10341 discriminants of anonymous access types (AI-402, AI-416)
10342
103432006-10-31 Bob Duff <duff@adacore.com>
10344 Robert Dewar <dewar@adacore.com>
10345 Gary Dismukes <dismukes@adacore.com>
10346 Ed Schonberg <schonberg@adacore.com>
10347
10348 * exp_ch5.ads (Expand_N_Extended_Return_Statement): New procedure.
10349
6f7f72f9 10350 * exp_ch5.adb (Expand_N_Loop_Statement): Do validity checks on range
70198b9f
AC
10351 (Expand_N_Assignment_Statement): Call
10352 Make_Build_In_Place_Call_In_Assignment if the right-hand side is a
10353 build-in-place function call. Currently, this can happen only for
10354 assignments that come from aggregates.
10355 Add -gnatd.l --Use Ada 95 semantics for limited function returns,
10356 in order to alleviate the upward compatibility introduced by AI-318.
10357 (Expand_N_Extended_Return_Statement): Add support for handling the
10358 return object as a build-in-place result.
10359 (Expand_Non_Function_Return): Implement simple return statements nested
10360 within an extended return.
10361 (Enable_New_Return_Processing): Turn on the new processing of return
10362 statements.
10363 (Expand_Non_Function_Return): For a return within an extended return,
10364 don't raise Program_Error, because Sem_Ch6 now gives a warning.
10365 (Expand_N_Extended_Return_Statement): Implement AI-318
10366 (Expand_Simple_Function_Return): Ditto.
10367 (Expand_N_If_Statement): Handle new -gnatwt warning
10368 (Expand_N_Case_Statement): Handle new -gnatwt warning
10369 (Expand_N_Assignment): Handle assignment to the Priority attribute of
10370 a protected object.
10371 (Expand_N_Assignment_Statement): Implement -gnatVe/E to control
10372 validity checking of assignments to elementary record components.
10373 (Expand_N_Return_Statement): return Class Wide types on the secondary
10374 stack independantly of their controlled status since with HIE runtimes,
10375 class wide types are not potentially controlled anymore.
10376
10377 * expander.adb (Expand): Add case for new N_Extended_Return_Statement
10378 node kind.
10379
10380 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Avoid
10381 Expand_Cleanup_Actions in case of N_Extended_Return_Statement, because
10382 it expects a block, procedure, or task. The return statement will get
10383 turned into a block, and Expand_Cleanup_Actions will happen then.
10384
103852006-10-31 Robert Dewar <dewar@adacore.com>
10386 Ed Schonberg <schonberg@adacore.com>
10387 Bob Duff <duff@adacore.com>
10388 Gary Dismukes <dismukes@adacore.com>
10389
10390 * exp_ch6.ads, exp_ch6.adb: Use new Validity_Check suppression
10391 capability.
10392 (Expand_Inlined_Call): Tagged types are by-reference types, and
10393 therefore should be replaced by a renaming declaration in the expanded
10394 body, as is done for limited types.
10395 (Expand_Call): If this is a call to a function with dispatching access
10396 result, propagate tag from context.
10397 (Freeze_Subprogram): Enable full ABI compatibility for interfacing with
10398 CPP by default.
10399 (Make_Build_In_Place_Call_In_Assignment): New procedure to do
10400 build-in-place when the right-hand side of an assignment is a
10401 build-in-place function call.
10402 (Make_Build_In_Place_Call_In_Allocator): Apply an unchecked conversion
10403 of the explicit dereference of the allocator to the result subtype of
10404 the build-in-place function. This is needed to satisfy type checking
10405 in cases where the caller's return object is created by an allocator for
10406 a class-wide access type and the type named in the allocator is a
10407 specific type.
10408 (Make_Build_In_Place_Call_In_Object_Declaration): Apply an unchecked
10409 conversion of the reference to the declared object to the result subtype
10410 of the build-in-place function. This is needed to satisfy type checking
10411 in cases where the declared object has a class-wide type. Also, in the
10412 class-wide case, change the type of the object entity to the specific
10413 result subtype of the function, to avoid passing a class-wide object
10414 without explicit initialization to the back end.
10415 (Register_Interface_DT_Entry): Moved outside the body of
10416 Freeze_Subprogram because this routine is now public; it is called from
10417 Check_Dispatching_Overriding to handle late overriding of abstract
10418 interface primitives.
10419 (Add_Access_Actual_To_Build_In_Place_Call): New utility procedure for
10420 adding an implicit access actual on a call to a build-in-place function.
10421 (Expand_Actuals): Test for an actual parameter that is a call to a
10422 build-in-place function and apply
10423 Make_Build_In_Place_Call_In_Anonymous_Context to the call.
10424 (Is_Build_In_Place_Function): New function to determine whether an
10425 entity is a function whose calls should be handled as build-in-place.
10426 (Is_Build_In_Place_Function_Call): New function to determine whether an
10427 expression is a function call that should handled as build-in-place.
10428 (Make_Build_In_Place_Call_In_Allocator): New procedure for handling
10429 calls to build-in-place functions as the initialization of an allocator.
10430 (Make_Build_In_Place_Call_In_Anonymous_Context): New procedure for
10431 handling calls to build-in-place functions in contexts that do not
10432 involve init of a separate object (for example, actuals of subprogram
10433 calls).
10434 (Make_Build_In_Place_Call_In_Object_Declaration): New procedure for
10435 handling calls to build-in-place functions as the initialization of an
10436 object declaration.
10437 (Detect_Infinite_Recursion): Add explicit parameter Process to
10438 instantiation of Traverse_Body to avoid unreferenced warning.
10439 (Check_Overriding_Inherited_Interfaces): Removed.
10440 (Register_Interface_DT_Entry): Code cleanup.
10441 (Register_Predefined_DT_Entry): Code cleanup.
10442 (Expand_Inlined_Call.Rewrite_Procedure_Call): Do not omit block around
10443 inlined statements if within a transient scope.
10444 (Expand_Inlined_Call.Process_Formals): When replacing occurrences of
10445 formal parameters with occurrences of actuals in inlined body, establish
10446 visibility on the proper view of the actual's subtype for the body's
10447 context.
10448 (Freeze_Subprogram): Do nothing if we are compiling under full ABI
10449 compatibility mode and we have an imported CPP subprogram because
10450 for now we assume that imported CPP primitives correspond with
10451 objects whose constructor is in the CPP side (and therefore we
10452 don't need to generate code to register them in the dispatch table).
10453 (Expand_Actuals): Introduce copy of actual, only if it might be a bit-
10454 aligned selected component.
10455 (Add_Call_By_Copy_Node): Add missing code to handle the case in which
10456 the actual of an in-mode parameter is a type conversion.
10457 (Expand_Actuals): If the call does not come from source and the actual
10458 is potentially misaligned, let gigi handle it rather than rejecting the
10459 (Expand_N_Subprogram_Body, Freeze_Subprogram): set subprograms returning
10460 Class Wide types as returning by reference independantly of their
10461 controlled status since with HIE runtimes class wide types are not
10462 potentially controlled anymore.
10463
6f7f72f9 104642006-10-31 Ed Schonberg <schonberg@adacore.com>
70198b9f 10465
6f7f72f9 10466 * exp_ch9.adb (Update_Prival_Types): Simplify code for entity
70198b9f
AC
10467 references that are private components of the protected object.
10468 (Build_Barrier_Function): Set flag Is_Entry_Barrier_Function
10469 (Update_Prival_Subtypes): Add explicit Process argument to Traverse_Proc
10470 instantiation to deal with warnings.
10471 (Initialize_Protection): If expression for priority is non-static, use
10472 System_Priority as its expected type, in case the expression has not
10473 been analyzed yet.
10474
104752006-10-31 Robert Dewar <dewar@adacore.com>
10476
10477 * exp_dbug.ads, exp_dbug.adb (Get_External_Name): Add missing
10478 initialization of Homonym_Len.
10479 (Fully_Qualify_Name): Remove kludge to eliminate anonymous block
10480 names from fully qualified name. Fixes problem of duplicate
10481 external names differing only in the presence of such a block name.
10482
104832006-10-31 Thomas Quinot <quinot@adacore.com>
10484 Pablo Oliveira <oliveira@adacore.com>
6f7f72f9
EB
10485
10486 * exp_dist.adb (Get_Subprogram_Ids): This function will no more assign
70198b9f
AC
10487 subprogram Ids, even if they are not yet assigned.
10488 (Build_Subprogram_Id): It is now this function that will take care of
10489 calling Assign_Subprogram_Ids if necessary.
10490 (Add_Receiving_Stubs_To_Declarations): Checking the subprograms ids
10491 should be done only once they are assigned.
10492 (Build_From_Any_Function, case of tagged types): Add missing call to
10493 Allocate_Buffer.
10494 (Corresponding_Stub_Type): New subprogram. Returns the associated stub
10495 type for an RACW type.
10496 (Add_RACW_Features): When processing an RACW declaration for which the
10497 designated type is already frozen, enforce E.2.2(14) rules immediately.
10498 (GARLIC_Support.Build_Subprogram_Receiving_Stubs): Do not perform any
10499 special reordering of controlling formals.
10500
10501 * exp_dist.ads (Corresponding_Stub_Type): New subprogram. Returns the
10502 associated stub type for an RACW type.
10503
105042006-10-31 Ed Schonberg <schonberg@adacore.com>
10505
10506 * exp_fixd.adb (Rounded_Result_Set): For multiplication and division of
10507 fixed-point operations in an integer context, i.e. as operands of a
10508 conversion to an integer type, indicate that result must be rounded.
10509
105102006-10-31 Robert Dewar <dewar@adacore.com>
10511
10512 * exp_imgv.adb (Expand_Image_Attribute): For Wide_[Wide_]Character
10513 cases, pass the encoding method, since it is now required by the run
10514 time.
10515
10516 * s-valwch.ads, s-valwch.adb (Value_Wide_Wide_Character): Avoid
10517 assumption that Str'First = 1.
10518 (Value_Wide_Character): Takes EM (encoding method) parameter and passes
10519 it on to the Value_Wide_Wide_Character call.
10520 (Value_Wide_Wide_Character): Takes EM (encoding method) parameter and
10521 properly handles a string of the form quote-encoded_wide_char-quote.
10522
10523 * s-wchcnv.adb: Minor reformatting
10524
105252006-10-31 Javier Miranda <miranda@adacore.com>
6f7f72f9 10526
70198b9f
AC
10527 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Add missing
10528 run-time membership test to ensure that the constructed object
10529 implements the target abstract interface.
10530
105312006-10-31 Robert Dewar <dewar@adacore.com>
10532
10533 * exp_prag.adb (Expand_Pragma_Common_Object): Use a single
10534 Machine_Attribute pragma internally to implement the user pragma.
10535 Add processing for pragma Interface so that it is now completely
10536 equivalent to pragma Import.
10537
10538 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Extend this pragma
10539 so that it can be applied to all entities, including record components
10540 and enumeration literals.
10541 (Analyze_Pragma, case Priority_Specific_Dispatching): Check whether
10542 priority ranges are correct, verify compatibility against task
10543 dispatching and locking policies, and if everything is correct an entry
10544 is added to the table containing priority specific dispatching entries
10545 for this compilation unit.
10546 (Delay_Config_Pragma_Analyze): Delay processing
10547 Priority_Specific_Dispatching pragmas because when processing the
10548 pragma we need to access run-time data, such as the range of
10549 System.Any_Priority.
10550 (Sig_Flags): Add Pragma_Priority_Specific_Dispatching.
10551 Allow pragma Unreferenced as a context item
10552 Add pragma Preelaborable_Initialization
10553 (Analyze_Pragma, case Interface): Interface is extended so that it is
10554 now syntactically and semantically equivalent to Import.
10555 (Analyze_Pragma, case Compile_Time_Warning): Fix error of blowups on
10556 insertion characters.
10557 Add handling for Pragma_Wide_Character_Encoding
10558 (Process_Restrictions_Restriction_Warnings): Ensure that a warning
10559 never supercedes a real restriction, and that a real restriction
10560 always supercedes a warning.
10561 (Analyze_Pragma, case Assert): Set Low_Bound_Known if assert is of
10562 appropriate form.
10563
105642006-10-31 Bob Duff <duff@adacore.com>
10565 Ed Schonberg <schonberg@adacore.com>
10566 Robert Dewar <dewar@adacore.com>
10567
10568 * exp_ch7.adb (Build_Array_Deep_Procs, Build_Record_Deep_Procs,
10569 Make_Deep_Record_Body): Rename Is_Return_By_Reference_Type to be
10570 Is_Inherently_Limited_Type, because return-by-reference has no meaning
10571 in Ada 2005.
10572 (Find_Node_To_Be_Wrapped): Use new method of determining the result
10573 type of the function containing a return statement, because the
10574 Return_Type field was removed. We now use the Return_Applies_To field.
10575
6f7f72f9 10576 * exp_util.ads, exp_util.adb: Use new subtype N_Membership_Test
70198b9f
AC
10577 (Build_Task_Image_Decl): If procedure is not called from an
10578 initialization procedure, indicate that function that builds task name
10579 uses the sec. stack. Otherwise the enclosing initialization procedure
10580 will carry the indication.
10581 (Insert_Actions): Remove N_Return_Object_Declaration. We now use
10582 N_Object_Declaration instead.
10583 (Kill_Dead_Code): New interface to implement -gnatwt warning for
10584 conditional dead code killed, and change implementation accordingly.
10585 (Insert_Actions): Add N_Return_Object_Declaration case.
10586 Correct comment to mention N_Extension_Aggregate node.
10587 (Set_Current_Value_Condition): Call Safe_To_Capture_Value to avoid bad
10588 attempts to save information for global variables which cannot be
10589 safely tracked.
10590 (Get_Current_Value_Condition): Handle conditions the other way round
10591 (constant on left). Also handle right operand of AND and AND THEN
10592 (Set_Current_Value_Condition): Corresponding changes
10593 (Append_Freeze_Action): Remove unnecessary initialization of Fnode.
10594 (Get_Current_Value_Condition): Handle simple boolean operands
10595 (Get_Current_Value_Condition): Handle left operand of AND or AND THEN
10596 (Get_Current_Value_Condition): If the variable reference is within an
10597 if-statement, does not appear in the list of then_statments, and does
10598 not come from source, treat it as being at unknown location.
10599 (Get_Current_Value_Condition): Enhance to allow while statements to be
10600 processed as well as if statements.
10601 (New_Class_Wide_Subtype): The entity for a class-wide subtype does not
10602 come from source.
10603 (OK_To_Do_Constant_Replacement): Allow constant replacement within body
10604 of loop. This is safe now that we fixed Kill_Current_Values.
10605 (OK_To_Do_Constant_Replacement): Check whether current scope is
10606 Standard, before examining outer scopes.
10607
106082006-10-31 Vincent Celier <celier@adacore.com>
10609
10610 * krunch.ads, krunch.adb (Krunch): New Boolean parameter VMS_On_Target.
10611 When True, apply VMS treatment to children of packages A, G, I and S.
10612 For F320-016
10613
10614 * fname-uf.adb (Get_File_Name): Call Krunch with OpenVMS_On_Target
10615
106162006-10-31 Robert Dewar <dewar@adacore.com>
10617 Ed Schonberg <schonberg@adacore.com>
10618
10619 * freeze.adb: Add handling of Last_Assignment field
10620 (Warn_Overlay): Supply missing continuation marks in error msgs
10621 (Freeze_Entity): Add check for Preelaborable_Initialization
10622
10623 * g-comlin.adb: Add Warnings (Off) to prevent new warning
10624
10625 * g-expect.adb: Add Warnings (Off) to prevent new warning
10626
10627 * lib-xref.adb: Add handling of Last_Assignment field
10628 (Generate_Reference): Centralize handling of pragma Obsolescent here
10629 (Generate_Reference): Accept an implicit reference generated for a
10630 default in an instance.
10631 (Generate_Reference): Accept a reference for a node that is not in the
10632 main unit, if it is the generic body corresponding to an subprogram
10633 instantiation.
10634
10635 * xref_lib.adb: Add pragma Warnings (Off) to avoid new warnings
10636
6f7f72f9 10637 * sem_warn.ads, sem_warn.adb (Set_Warning_Switch): Add processing for
70198b9f
AC
10638 -gnatwq/Q.
10639 (Warn_On_Useless_Assignment): Suppress warning if enclosing inner
10640 exception handler.
10641 (Output_Obsolescent_Entity_Warnings): Rewrite to avoid any messages on
10642 use clauses, to avoid messages on packages used to qualify, and also
10643 to avoid messages from obsolescent units.
10644 (Warn_On_Useless_Assignments): Don't generate messages for imported
10645 and exported variables.
10646 (Warn_On_Useless_Assignments): New procedure
10647 (Output_Obsolescent_Entity_Warnings): New procedure
10648 (Check_Code_Statement): New procedure
10649
6f7f72f9 10650 * einfo.ads, einfo.adb (Has_Static_Discriminants): New flag
70198b9f
AC
10651 Change name Is_Ada_2005 to Is_Ada_2005_Only
10652 (Last_Assignment): New field for useless assignment warning
10653
106542006-10-31 Olivier Hainque <hainque@adacore.com>
10655
10656 * g-alleve.adb (lvx, stvx): Ceil-Round the Effective Address to the
10657 closest multiple of VECTOR_ALIGNMENT and not the closest multiple of 16.
10658
106592006-10-31 Bob Duff <duff@adacore.com>
10660 Robert Dewar <dewar@adacore.com>
10661 Ed Schonberg <schonberg@adacore.com>
10662
10663 * g-awk.adb (Default_Session, Current_Session): Compile this file in
10664 Ada 95 mode, because it violates the new rules for AI-318.
10665
10666 * g-awk.ads: Use overloaded subprograms in every case where we used to
10667 have a default of Current_Session. This makes the code closer to be
10668 correct for both Ada 95 and 2005.
10669
10670 * g-moreex.adb (Occurrence): Turn off warnings for illegal-in-Ada-2005
10671 code, relying on the fact that the compiler generates a warning
10672 instead of an error in -gnatg mode.
10673
10674 * lib-xref.ads (Xref_Entity_Letters): Add entry for new
10675 E_Return_Statement entity kind.
10676 Add an entry for E_Incomplete_Subtype in Xref_Entity_Letters.
10677
10678 * par.adb (P_Interface_Type_Definition): Addition of one formal to
10679 report an error if the reserved word abstract has been previously found.
10680 (SS_End_Type): Add E_Return for new extended_return_statement syntax.
6f7f72f9
EB
10681
10682 * par-ch4.adb (P_Aggregate_Or_Paren_Expr): Improve message for
70198b9f
AC
10683 parenthesized range attribute usage
10684 (P_Expression_No_Right_Paren): Add missing comment about error recovery.
10685
10686 * par-ch6.adb (P_Return_Object_Declaration): AI-318: Allow "constant"
10687 in the syntax for extended_return_statement. This is not in the latest
10688 RM, but the ARG is expected to issue an AI allowing this.
10689 (P_Return_Subtype_Indication,P_Return_Subtype_Indication): Remove
10690 N_Return_Object_Declaration. We now use N_Object_Declaration instead.
10691 (P_Return_Object_Declaration, P_Return_Subtype_Indication,
10692 P_Return_Statement): Parse the new syntax for extended_return_statement.
10693
10694 * par-endh.adb (Check_End, Output_End_Deleted, Output_End_Expected,
10695 Output_End_Missing): Add error-recovery code for the new
10696 extended_return_statement syntax; that is, the new E_Return entry on
10697 the scope stack.
10698
10699 * s-auxdec-vms_64.ads, s-auxdec.ads (AST_Handler): Change type from
10700 limited to nonlimited, because otherwise we violate the new Ada 2005
10701 rules about returning limited types in function Create_AST_Handler in
10702 s-asthan.adb.
10703
10704 * sem.adb (Analyze): Add cases for new node kinds
10705 N_Extended_Return_Statement and N_Return_Object_Declaration.
10706
10707 * sem_aggr.adb (Aggregate_Constraint_Checks): Verify that component
10708 type is in the same category as type of context before applying check,
10709 to prevent anomalies in instantiations.
10710 (Resolve_Aggregate): Remove test for limited components in aggregates.
10711 It's unnecessary in Ada 95, because if it has limited components, then
10712 it must be limited. It's wrong in Ada 2005, because limited aggregates
10713 are now allowed.
10714 (Resolve_Record_Aggregate): Move check for limited types later, because
10715 OK_For_Limited_Init requires its argument to have been resolved.
10716 (Get_Value): When copying the component default expression for a
10717 defaulted association in an aggregate, use the sloc of the aggregate
10718 and not that of the original expression, to prevent spurious
10719 elaboration errors, when the expression includes function calls.
10720 (Check_Non_Limited_Type): Correct code for AI-287, extension aggregates
10721 were missing. We also didn't handle qualified expressions. Now also
10722 allow function calls. Use new common routine OK_For_Limited_Init.
10723 (Resolve_Extension_Aggregate): Minor fix to bad error message (started
10724 with space can upper case letter).
10725
6f7f72f9 10726 * sem_ch3.ads, sem_ch3.adb (Create_Constrained_Components): Set
70198b9f 10727 Has_Static_Discriminants flag
6f7f72f9
EB
10728 (Record_Type_Declaration): Diagnose an attempt to declare an interface
10729 type with discriminants.
10730 (Process_Range_Expr_In_Decl): Do validity checks on range
70198b9f
AC
10731 (Build_Discriminant_Constraints): Use updated form of
10732 Denotes_Discriminant.
10733 (Process_Subtype): If the subtype is a private subtype whose full view
10734 is a concurrent subtype, introduce an itype reference to prevent scope
10735 anomalies in gigi.
10736 (Build_Derived_Record_Type, Collect_Interface_Primitives,
10737 Record_Type_Declaration): The functionality of the subprograms
10738 Collect_Abstract_Interfaces and Collect_All_Abstract_Interfaces
10739 is now performed by a single routine.
10740 (Build_Derived_Record_Type): If the type definition includes an explicit
10741 indication of limitedness, then the type must be marked as limited here
10742 to ensure that any access discriminants will not be treated as having
10743 a local anonymous access type.
10744 (Check_Abstract_Overriding): Issue a detailed error message when an
10745 abstract subprogram was not overridden due to incorrect mode of its
10746 first parameter.
10747 (Analyze_Private_Extension_Declaration): Add support for the analysis of
10748 synchronized private extension declarations. Verify that the ancestor is
10749 a limited or synchronized interface or in the generic case, the ancestor
10750 is a tagged limited type or synchronized interface and all progenitors
10751 are either limited or synchronized interfaces.
10752 Derived_Type_Declaration): Check for presence of private extension when
10753 dealing with synchronized formal derived types.
10754 Process_Full_View): Enchance the check done on the usage of "limited" by
10755 testing whether the private view is synchronized.
10756 Verify that a synchronized private view is completed by a protected or
10757 task type.
10758 (OK_For_Limited_Init_In_05): New function.
10759 (Analyze_Object_Declaration): Move check for limited types later,
10760 because OK_For_Limited_Init requires its argument to have been resolved.
10761 Add -gnatd.l --Use Ada 95 semantics for limited function returns,
10762 in order to alleviate the upward compatibility introduced by AI-318.
10763 (Constrain_Corresponding_Record): If the constraint is for a component
10764 subtype, mark the itype as frozen, to avoid out-of-scope references to
10765 discriminants in the back-end.
10766 (Collect_Implemented_Interfaces): Protect the recursive algorithm of
10767 this subprogram against wrong sources.
10768 (Get_Discr_Value, Is_Discriminant): Handle properly references to a
10769 discriminant of limited type completed with a protected type, when the
10770 discriminant is used to constrain a private component of the type, and
10771 expansion is disabled.
10772 (Find_Type_Of_Object): Do not treat a return subtype that is an
10773 anonymous subtype as a local_anonymous_type, because its accessibility
10774 level is the return type of the enclosing function.
10775 (Check_Initialization): In -gnatg mode, turn the error "cannot
10776 initialize entities of limited type" into a warning.
10777 (OK_For_Limited_Init): Return true for generated nodes, since it
10778 sometimes violates the legality rules.
10779 (Make_Incomplete_Declaration): If the type for which an incomplete
10780 declaration is created happens to be the currently visible entity,
10781 preserve the homonym chain when removing it from visibility.
10782 (Check_Conventions): Add support for Ada 2005 (AI-430): Conventions of
10783 inherited subprograms.
10784 (Access_Definition): If this is an access to function that is the return
10785 type of an access_to_function definition, context is a type declaration
10786 and the scope of the anonymous type is the current one.
10787 (Analyze_Subtype_Declaration): Add the defining identifier of a regular
10788 incomplete subtype to the set of private dependents of the original
10789 incomplete type.
10790 (Constrain_Discriminated_Type): Emit an error message whenever an
10791 incomplete subtype is being constrained.
10792 (Process_Incomplete_Dependents): Transform an incomplete subtype into a
10793 corresponding subtype of the full view of the original incomplete type.
10794 (Check_Incomplete): Properly detect invalid usage of incomplete types
10795 and subtypes.
10796
107972006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
10798
10799 * g-catiio.ads, g-catiio.adb (Value): New function.
10800 Given an input String, try and parse a valid Time value.
10801
108022006-10-31 Vincent Celier <celier@adacore.com>
10803
10804 * g-debpoo.adb (Is_Valid): Correctly compute Offset using
10805 Integer_Address arithmetic, as in Set_Valid.
10806
108072006-10-31 Arnaud Charlet <charlet@adacore.com>
10808 Robert Dewar <dewar@adacore.com>
10809
10810 * gnatcmd.adb (Process_Link): Use Osint.Executable_Name instead of
10811 handling executable extension manually and duplicating code.
10812
10813 * make.adb: Implement new -S switch
10814 (Gnatmake): Use new function Osint.Executable_Name instead
10815 of handling executable extension manually.
10816
10817 * prj-util.adb (Executable_Of): Make sure that if an Executable_Suffix
10818 is specified, the executable name ends with this suffix.
10819 Take advantage of Osint.Executable_Name instead of duplicating code.
10820
10821 * switch-m.adb: Recognize new gnatmake -S switch
10822
10823 * targparm.ads, targparm.adb (Executable_Extension_On_Target): New
10824 variable.
10825 (Get_Target_Parameters): Set Executable_Extension_On_Target if
10826 available.
10827
10828 * makeusg.adb: Add line for gnatmake -S switch
10829
108302006-10-31 Vincent Celier <celier@adacore.com>
10831
10832 * gnatlink.adb (Gnatlink): If gcc is not called with -shared-libgcc,
10833 call it with -static-libgcc, as there are some platforms, such as
10834 Darwin, where one of these two switches is compulsory to link.
10835
108362006-10-31 Vincent Celier <celier@adacore.com>
6f7f72f9 10837
70198b9f
AC
10838 * gnatls.adb: Take into account GPR_PROJECT_PATH, when it is defined,
10839 instead of ADA_PROJECT_PATH, for the project path.
10840 (Gnatls): When displaying the project path directories, use host dir
10841 specs.
10842
10843 * prj-ext.adb (Prj.Ext elaboration): On VMS, only expand relative path
10844 names in the project path, as absolute paths may correspond to
10845 multi-valued VMS logical names.
10846
108472006-10-31 Vincent Celier <celier@adacore.com>
10848
10849 * g-os_lib.ads, g-os_lib.adb (Locate_Exec_On_Path): Always return an
10850 absolute path name.
10851 (Locate_Regular_File): Ditto
10852 (Change_Dir): Remove, no longer used
10853 (Normalize_Pathname): Do not use Change_Dir to get the drive letter
10854 on Windows. Get it calling Get_Current_Dir.
10855 (OpenVMS): Remove imported boolean, no longer needed.
10856 (Normalize_Pathname)[VMS]: Do not resolve directory names.
10857 (Pid_To_Integer): New function to convert a Process_Id to Integer
10858
108592006-10-31 Thomas Quinot <quinot@adacore.com>
10860
10861 * g-socket.ads, g-socket.adb (Close_Selector): Once the signalling
10862 sockets are closed, reset the R_Sig_Socket and W_Sig_Socket components
10863 to No_Socket.
10864 (Selector_Type): Add default value of No_Socket for R_Sig_Socket and
10865 W_Sig_Socket.
10866
108672006-10-31 Robert Dewar <dewar@adacore.com>
10868
10869 * g-speche.ads, g-speche.adb: Add special case to recognize misspelling
10870 initial letter o as a zero.
10871
108722006-10-31 Robert Dewar <dewar@adacore.com>
10873
10874 * g-spipat.adb (S_To_PE): Remove incorrect use of 0 instead of Str'First
10875
108762006-10-31 Robert Dewar <dewar@adacore.com>
10877
6f7f72f9
EB
10878 * layout.adb (Layout_Record_Type): Deal with non-static subtypes of
10879 variant records
10880 (Layout_Variant_Record): Retrieve the discriminants from the entity
70198b9f
AC
10881 rather than from the type definition, because in the case of a full
10882 type for a private type we need to take the discriminants from the
10883 partial view.
6f7f72f9
EB
10884 (Layout_Component_List): When applying the Max operator to variants with
10885 a nonstatic size, check whether either operand is static and scale that
10886 operand from bits to storage units before applying Max.
70198b9f
AC
10887 (Layout_Type): In VMS, if a C-convention access type has no explicit
10888 size clause (and does not inherit one in the case of a derived type),
10889 then the size is reset to 32 from 64.
10890
108912006-10-31 Vincent Celier <celier@adacore.com>
10892
10893 * lib-load.adb (Load_Unit): Skip the test for a unit not found when
10894 its file has already been loaded, according to the unit being loaded,
10895 not to the current value of Multiple_Unit_Index.
10896
108972006-10-31 Thomas Quinot <quinot@adacore.com>
10898 Eric Botcazou <ebotcazou@adacore.com>
10899 Arnaud Charlet <charlet@adacore.com>
10900
10901 * Makefile.in: Set EH mechanism to ZCX for FreeBSD.
10902 (NO_REORDER_ADAFLAGS): New var defined to -fno-toplevel-reorder if
10903 possible.
10904 (a-except.o): Pass it to the compiler.
10905 (gnatlib-shared-vms): Removed -nostartfiles switch in link step.
10906 (LIBGNAT_TARGET_PAIRS for Windows): Avoid the use of the specific
10907 a-calend-mingw.adb version.
10908
6f7f72f9 10909 * Makefile.rtl: Added s-dsaser.
70198b9f
AC
10910 Add object entries for Ada.Calendar.[Arithmetic/Formatting/Time_Zones]
10911 (GNATRTL_TASKING_OBJS): Add Ada.Dispatching and
10912 Ada.Dispatching.Round_Robin.
10913 Added new unit Ada.Containers.Restricted_Bounded_Doubly_Linked_Lists
10914
10915 * Make-lang.in: Remove all references to gt-ada-decl.h.
10916 Add concatenation (s-strops/s-sopco3/s-sopco4/s-sopco5) to compiler
10917 sources.
10918 Add dependency on ada/s-restri.o for GNAT1 and GNATBIND objects.
10919 Update dependencies.
10920
10921 * system-freebsd-x86.ads: Make ZCX the default EH mechanism for FreeBSD
10922
109232006-10-31 Vincent Celier <celier@adacore.com>
10924
10925 * mlib-utl.adb (Initialized): Remove, no longer used
10926 (Initialize): Remove, no longer used
10927 (Ar): If Ar_Exec is null, get the location of the archive builder and,
10928 if there is one, the archive indexer. Fail if the archive builder cannot
10929 be found.
10930 (Gcc): If the driver path is unknown, get it. Fail if the driver cannot
10931 be found.
10932
109332006-10-31 Ed Schonberg <schonberg@adacore.com>
10934
10935 * sem_ch10.ads, sem_ch10.adb (Check_Redundant_Withs,
10936 Process_Body_Clauses): If the context of a body includes a use clause
10937 for P.Q then a with_clause for P in the same body is not redundant,
10938 even if the spec also has a with_clause on P.
10939 Add missing continuation mark to error msg
10940 (Build_Limited_Views): A limited view of a type is tagged if its
10941 declaration includes a record extension.
10942 (Analyze_Proper_Body): Set Corresponding_Stub field in N_Subunit
10943 node, even if the subunit has errors. This avoids malfunction by
10944 Lib.Check_Same_Extended_Unit in the presence of syntax errors.
10945 (Analyze_Compilation_Unit): Add circuit to make sure we get proper
10946 generation of obsolescent messages for with statements (cannot do
10947 this too early, or we cannot implement avoiding the messages in the
10948 case of obsolescent units withing obsolescent units).
10949 (Install_Siblings): If the with_clause is on a remote descendant of
10950 an ancestor of the current compilation unit, find whether there is
10951 a sibling child unit that is immediately visible.
10952 (Remove_Private_With_Clauses): New procedure, invoked after completing
10953 the analysis of the private part of a nested package, to remove from
10954 visibility the private with_clauses of the enclosing package
10955 declaration.
10956 (Analyze_With_Clause): Remove Check_Obsolescent call, this checking is
10957 now centralized in Generate_Reference.
10958 (Install_Limited_Context_Clauses): Remove superfluous error
10959 message associated with unlimited view visible through use
10960 and renamings. In addition, at the point in which the error
10961 is reported, we add the backslash to the text of the error
10962 to ensure that it is reported as a single error message.
10963 Use new // insertion for some continuation messages
10964 (Expand_Limited_With_Clause): Use copy of name rather than name itself,
10965 to create implicit with_clause for parent unit mentioned in original
10966 limited_with_clause.
10967 (Install_Limited_With_Unit): Set entity of parent identifiers if the
10968 unit is a child unit. For ASIS queries.
10969 (Analyze_Subunit): If the subunit appears within a child unit, make all
10970 ancestor child units directly visible again.
10971
109722006-10-31 Robert Dewar <dewar@adacore.com>
10973
10974 * par-ch10.adb (P_Context_Clause): Minor error message fix
10975
109762006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
10977 Javier Miranda <miranda@adacore.com>
10978
10979 * par-ch12.adb: Grammar update and cleanup.
10980 (P_Formal_Type_Definition, P_Formal_Derived_Type_Definition): Add
10981 support for synchronized derived type definitions.
10982 Add the new actual Abstract_Present to every call to
10983 P_Interface_Type_Definition.
10984 (P_Formal_Object_Declarations): Update grammar rules. Handle parsing of
10985 a formal object declaration with an access definition or a subtype mark
10986 with a null exclusion.
10987 (P_Generic_Association): Handle association with box, and others_choice
10988 with box, to support Ada 2005 partially parametrized formal packages.
10989
109902006-10-31 Robert Dewar <dewar@adacore.com>
10991 Javier Miranda <miranda@adacore.com>
6f7f72f9 10992
70198b9f
AC
10993 * par-ch3.adb (P_Range_Or_Subtype_Mark): Check for bad parentheses
10994 (P_Type_Declaration): Remove barrier against the reserved word "limited"
10995 after "abstract" to give support to the new syntax of AARM 3.4 (2/2).
10996 (P_Type_Declaration): Minor code cleanup. Add support for synchronized
10997 private extensions.
10998 (P_Type_Declaration): Add the new actual Abstract_Present to every call
10999 to P_Interface_Type_Definition.
11000 (P_Interface_Type_Definition): Addition of one formal to report an error
11001 if the reserved word abstract has been previously found.
11002 (P_Identifier_Declarations): Update grammar rules. Handle parsing of an
11003 object renaming declaration with an access definition or subtype mark
11004 with a possible null exclusion.
11005
11006 * par-ch9.adb: Minor error msg fix
11007
11008 * par-load.adb: Add missing continuation mark to error msg
11009
11010 * par-tchk.adb: (Wrong_Token): Code cleanup, use concatenation
11011
110122006-10-31 Vincent Celier <celier@adacore.com>
11013
11014 * prj-dect.adb (Parse_Attribute_Declaration): Do not issue warning for
11015 unknown attribute in unknown package or in package that does not need
11016 to be checked.
11017 (Parse_Package_Declaration): Do not issue warning for unknown package in
11018 quiet output.
11019
110202006-10-31 Vincent Celier <celier@adacore.com>
11021
11022 * prj-makr.adb (Packages_To_Check_By_Gnatname): New global constant
11023 (Make): Call Parse with Packages_To_Check_By_Gnatname for parameter
11024 Packages_To_Check.
11025
110262006-10-31 Vincent Celier <celier@adacore.com>
11027
11028 * prj-nmsc.adb (Check_Ada_Name): For children of package A, G, I and S
11029 on VMS, change "__" to '.' before checking the name.
11030 (Record_Ada_Source): Always add the source file name in the list of
11031 of sources, even if it is not the first time, as it is for another
11032 source index.
11033 (Get_Unit): Replace both '_' (after 'a', 'g', 'i' or 's') with a single
11034 dot, instead of replacing only the first '_'.
11035
11036 * prj-part.adb (Parse): Convert project file path to canonical form
11037
11038 * prj-proc.adb (Recursive_Process): Make sure that, when a project is
11039 extended, the project id of the project extending it is recorded in its
11040 data, even when it has already been processed as an imported project.
11041
110422006-10-31 Robert Dewar <dewar@adacore.com>
11043
11044 * repinfo.adb (List_Entities): Don't list entities from renaming
11045 declarations.
11046
110472006-10-31 Arnaud Charlet <charlet@adacore.com>
11048 Robert Dewar <dewar@adacore.com>
11049
11050 * restrict.ads, restrict.adb (Restriction_Active): Now returns False if
11051 only a restriction warning is active for the given restriction. This is
11052 desirable because we do not want to modify code in the case where only
11053 a warning is set.
11054 (Set_Profile_Restrictions): Make sure that a Profile_Warnings never
11055 causes overriding of real restrictions.
11056 Take advantage of new No_Restrictions constant.
11057
11058 * raise.h: (__gnat_set_globals): Change profile.
11059
110602006-10-31 Arnaud Charlet <charlet@adacore.com>
70198b9f 11061
6f7f72f9
EB
11062 * rtsfind.adb: Remove s-polint from comment as it exists no more.
11063
11064 * rtsfind.ads:
11065 Move entity RE_Get_Active_Partition_Id to package System.DSA_Services.
11066 Move all the entities in obsolete package System.PolyORB_Interface to
11067 System.Partition_Interface.
70198b9f
AC
11068 (RE_Storage_Size): New function in System.Tasking.
11069 (RE_Get_Ceiling): New entity.
11070 (RE_Set_Ceiling): New entity.
11071 (RO_PE_Get_Ceiling): New entity.
11072 (RO_RE_Set_Ceiling): New entity.
11073 (Inherit_CPP_DT): New entity
11074
110752006-10-31 Robert Dewar <dewar@adacore.com>
11076
11077 * scng.adb (Scan, case of numeric literal): Better msg for identifier
11078 starting with a digit.
11079
110802006-10-31 Ed Schonberg <schonberg@adacore.com>
11081 Thomas Quinot <quinot@adacore.com>
11082 Javier Miranda <miranda@adacore.com>
11083 Gary Dismukes <dismukes@adacore.com>
11084
11085 * sem_attr.ads, sem_attr.adb (Analyze_Access_Attribute): Diagnose
11086 properly an attempt to apply Unchecked_Access to a protected operation.
11087 (OK_Self_Reference): New subprogram to check the legality of an access
11088 attribute whose prefix is the type of an enclosing aggregate.
11089 Generalizes previous mechanism to handle attribute references nested
11090 arbitrarily deep within the aggregate.
11091 (Analyze_Access_Attribute): An access attribute whose prefix is a type
11092 can appear in an aggregate if this is a default-initialized aggregate
11093 for a self-referential type.
11094 (Resolve_Attribute, case Access): Ditto.
11095 Add support for new implementation defined attribute Stub_Type.
11096 (Eval_Attribute, case Attribute_Stub_Type): New case.
11097 (Analyze_Attribute, case Attribute_Stub_Type): New case.
11098 (Stream_Attribute_Available): Implement using new subprogram from
11099 sem_cat, Has_Stream_Attribute_Definition, instead of incorrect
11100 Has_Specified_Stream_Attribute flag.
11101 Disallow Storage_Size and Storage_Pool for access to subprogram
11102 (Resolve_Attribute, case 'Access et al): Take into account anonymous
11103 access types of return subtypes in extended return statements. Remove
11104 accessibility checks on anonymous access types when Unchecked_Access is
11105 used.
11106 (Analyze_Attribute): Add support for the use of 'Class to convert
11107 a class-wide interface to a tagged type.
11108 Add support for the attribute Priority.
11109 (Resolve_Attribute, case Attribute_Access): For Ada_05, add test for
11110 whether the designated type is discriminated with a constrained partial
11111 view and require static matching in that case.
11112 Add local variable Des_Btyp. The Designated_Type
11113 of an access to incomplete subtype is either its non-limited view if
11114 coming from a limited with or its etype if regular incomplete subtype.
11115
11116 * sem_cat.ads, sem_cat.adb (Validate_Remote_Access_To_Class_Wide_Type):
11117 Fix predicate to identify and allow cases of (expander-generated)
11118 references to tag of designated object of a RACW.
11119 (Validate_Static_Object_Name): In Ada 2005, a formal object is
11120 non-static, and therefore cannot appear as a primary in a preelaborable
11121 package.
11122 (Has_Stream_Attribute_Definition): New subprogram, abstracted from
11123 Has_Read_Write_Attributes.
11124 (Has_Read_Write_Attributes): Reimplement in termes of
11125 Has_Stream_Attribute_Definition.
11126 (Missing_Read_Write_Attributes): When checking component types in a
11127 record, unconditionally call Missing_Read_Write_Attributes recursively
11128 (remove guard checking for Is_Record_Type / Is_Access_Type).
11129
111302006-10-31 Robert Dewar <dewar@adacore.com>
11131
11132 * sem_ch11.adb (Analyze_Handled_Statements): Move final test for
11133 useless assignments here and conditionalize it on absence of exception
11134 handlers.
11135 (Analyze_Exception_Handlers): Small code reorganization of error
11136 detection code, for new handling of formal packages.
11137
111382006-10-31 Ed Schonberg <schonberg@adacore.com>
11139 Hristian Kirtchev <kirtchev@adacore.com>
6f7f72f9
EB
11140
11141 * sem_ch12.ads, sem_ch12.adb (Save_References): If node is an operator
70198b9f
AC
11142 that has been constant-folded, preserve information of original tree,
11143 for ASIS uses.
11144 (Analyze_Formal_Derived_Type): Set the limited present flag of the newly
11145 generated private extension declaration if the formal derived type is
11146 synchronized. Carry synchronized present over to the generated private
11147 extension.
11148 (Validate_Derived_Type_Instance): Ensure that the actual of a
11149 synchronized formal derived type is a synchronized tagged type.
11150 (Instantiate_Formal_Package): When creating the instantiation used to
11151 validate the actual package of a formal declared without a box, check
11152 whether the formal itself depends on a prior actual.
11153 (Instantiate_Formal_Subprogram): Create new entities for the defining
11154 identifiers of the formals in the renaming declaration, for ASIS use.
11155 (Instantiate_Formal_Subprogram, Instantiate_Formal_Type): When creating
11156 a renaming declaration or a subtype declaration for an actual in an
11157 instance, capture location information of declaration in generic, for
11158 ASIS use.
11159 (Instantiate_Formal_Package): Add comments on needed additional tests.
11160 AI-317 (partial parametrization) is fully implemented.
11161 (Validate_Private_Type_Instance): Add check for actual which
11162 must have preelaborable initialization
11163 Use new // insertion for some continuation messages
11164 (Analyze_Formal_Object_Declaration): Change usage of Expression to
11165 Default_Expression. Add type retrieval when the declaration has an
11166 access definition. Update premature usage of incomplete type check.
11167 (Check_Access_Definition): New subsidiary routine. Check whether the
11168 current compilation version is Ada 05 and the supplied node has an
11169 access definition.
11170 (Instantiate object): Alphabetize local variables. Handle the creation
11171 of new renaming declarations with respect to the kind of definition
11172 used - either an access definition or a subtype mark. Guard against
11173 unnecessary error message in the context of anonymous access types after
11174 they have been resolved. Add check for required null exclusion in a
11175 formal object declaration.
11176 (Switch_View): A private subtype of a non-private type needs to be
11177 switched (the base type can have been switched without its private
11178 dependents because of the last branch of Check_Private_View.
11179 (Check_Private_View): Do not recompute Base_Type (T), instead use cached
11180 value from BT.
11181 (Instantiate_Type): Emit an error message whenever a class-wide type of
11182 a tagged incomplete type is used as a generic actual.
11183 (Find_Actual_Type): Extend routine to handle a component type in a child
11184 unit that is imported from a formal package in a parent.
11185 (Validate_Derived_Type_Instance): Check that analyzed formal and actual
11186 agree on constrainedness, rather than checking against ultimate ancestor
11187 (Instantiate_Subprogram_Body): Create a cross-reference link to the
11188 generic body, for navigation purposes.
11189
111902006-10-31 Robert Dewar <dewar@adacore.com>
11191 Thomas Quinot <quinot@adacore.com>
11192
11193 * sem_ch13.adb: Storage pool cannot be given for access to subprogram
11194 type.
11195 (New_Stream_Subprogram): When processing an attribute definition clause
11196 for a stream-oriented subprogram, record an entity node occurring at
11197 the point of clause to use for checking the visibility of the clause,
11198 as defined by 8.3(23) as amended by AI-195.
11199 (New_Stream_Subprogram): New procedure, factoring behaviour from both
11200 New_Stream_Function and New_Stream_Procedure.
11201 (New_Stream_Function, New_Stream_Procedure): Removed.
11202 (Analyze_Attribute_Definition_Clause, case Address): Check new
11203 Alignment_Check check
11204
112052006-10-31 Ed Schonberg <schonberg@adacore.com>
11206 Javier Miranda <miranda@adacore.com>
11207 Robert Dewar <dewar@adacore.com>
11208
11209 * sem_ch4.adb (Try_Primitive_Operation): Code cleanup to ensure that we
11210 generate the same errors compiling under -gnatc.
11211 (Try_Object_Operation): If no candidate interpretation succeeds, but
11212 there is at least one primitive operation with the right name, report
11213 error in call rather than on a malformed selected component.
11214 (Analyze_Selected_Component): If the prefix is an incomplete type from
11215 a limited view, and the full view is available, use the full view to
11216 determine whether this is a prefixed call to a primitive operation.
11217 (Operator_Check): Verify that a candidate interpretation is a binary
11218 operation before checking the type of its second formal.
11219 (Analyze_Call): Add additional warnings for function call contexts not
11220 yet supported.
11221 (Analyze_Allocator): Move the check for "initialization not allowed for
11222 limited types" after analyzing the expression. This is necessary,
11223 because OK_For_Limited_Init looks at the structure of the expression.
11224 Before analysis, we don't necessarily know what sort of expression it
11225 is. For example, we don't know whether F(X) is a function call or an
11226 indexed component; the former is legal in Ada 2005; the latter is not.
11227 (Analyze_Allocator): Correct code for AI-287 -- extension aggregates
11228 were missing. We also didn't handle qualified expressions. Now also
11229 allow function calls. Use new common routine OK_For_Limited_Init.
11230 (Analyze_Type_Conversion): Do not perform some legality checks in an
11231 instance, because the error message will be redundant or spurious.
11232 (Analyze_Overloaded_Selected_Component): Do not do style check when
11233 setting an entity, since we do not know it is the right entity yet.
11234 (Analyze_Selected_Component): Move Generate_Reference call to Sem_Res
11235 (Analyze_Overloaded_Selected_Component): Same change
11236 (Analyze_Selected_Component): Remove unnecessary prefix type retrieval
11237 since regular incomplete subtypes are transformed into corresponding
11238 subtypes of their full views.
11239 (Complete_Object_Operation): Treat name of transformed subprogram call
11240 as coming from source, for browsing purposes.
11241 (Try_Primitive_Operation): If formal is an access parameter, compare
11242 with base type of object to determine whether it is a primitive
11243 operation.
11244 (Operator_Check): If no interpretation of the operator matches, check
11245 whether a use clause on any candidate might make the operation legal.
11246 (Try_Class_Wide_Operation): Check whether the first parameter is an
11247 access type whose designated type is class-wide.
11248
112492006-10-31 Robert Dewar <dewar@adacore.com>
11250 Ed Schonberg <schonberg@adacore.com>
11251 Gary Dismukes <dismukes@adacore.com>
11252
11253 * sem_ch5.ads, sem_ch5.adb (Analyze_Loop_Statement): Add circuit to
11254 warn on infinite loops.
11255 Add \\ to some continuation messages
11256 (Analyze_Assignment_Statement): Call Warn_On_Useless_Assignment
11257 (Process_Bounds): If the bounds are integer literals that result from
11258 constant-folding, and they carry a user-defined type, preserve that type
11259 rather than treating this as an integer range.
11260 (Analyze_Exit_Statement): Test for E_Return_Statement in legality check.
11261 (Analyze_Goto_Statement): Test for E_Return_Stateemnt in legality check.
11262 (Analyze_Assignment_Statement): Add call to Check_Elab_Assign for
11263 left hand side of assignment.
11264 (Analyze_Assignment): Add suport to manage assigments to the attribute
11265 priority of a protected object.
11266 (Check_Possible_Current_Value_Condition): Allow fully qualified names
11267 not just identifiers.
11268 (Check_Possible_Current_Value_Condition): Acquire left operand of AND
11269 or AND THEN for possible tracking.
11270 (Analyze_Iteration_Scheme): Check for setting Current_Value for the
11271 case of while loops so we can track values in the loop body.
11272
112732006-10-31 Ed Schonberg <schonberg@adacore.com>
11274 Hristian Kirtchev <kirtchev@adacore.com>
11275 Bob Duff <duff@adacore.com>
6f7f72f9 11276
70198b9f
AC
11277 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Declaration): A null
11278 procedure cannot be a protected operation (it is a basic_declaration,
11279 not a subprogram_declaration).
11280 (Check_Overriding_Indicator): Rename formal Does_Override to Overridden_
11281 Subp. Add logic for entry processing.
11282 (Check_Synchronized_Overriding): New procedure in New_Overloaded_Entity.
11283 Determine whether an entry or subprogram of a protected or task type
11284 override an inherited primitive of an implemented interface.
11285 (New_Overloaded_Entity): Add calls to Check_Synchronized_Overriding.
11286 Update the actual used in calls to Check_Overriding_Indicator.
11287 (Analyze_Generic_Subprogram_Body): If the subprogram is a child unit,
11288 generate the proper reference to the parent unit, for cross-reference.
11289 (Analyze_Subprogram_Declaration): Protect Is_Controlling_Formal with
11290 Is_Formal.
11291 Add -gnatd.l --Use Ada 95 semantics for limited function returns,
11292 (Add_Extra_Formal): Revise procedure to allow passing in associated
11293 entity, scope, and name suffix, and handle setting of the new
11294 Extra_Formals field.
11295 (Create_Extra_Formals): Change existing calls to Add_Extra_Formal to
11296 pass new parameters. Add support for adding the new extra access formal
11297 for functions whose calls are treated as build-in-place.
11298 (Analyze_A_Return_Statement): Correct casing in error message.
11299 Move Pop_Scope to after Analyze_Function_Return, because an extended
11300 return statement really is a full-fledged scope. Otherwise, visibility
11301 doesn't work right. Correct use of "\" for continuation messages.
11302 (Analyze_Function_Return): Call Analyze on the Obj_Decl, rather than
11303 evilly trying to call Analyze_Object_Declaration directly. Otherwise,
11304 the node doesn't get properly marked as analyzed.
11305 (Analyze_Subprogram_Body): If subprogram is a function that returns
11306 an anonymous access type that denotes a task, build a Master Entity
11307 for it.
11308 (Analyze_Return_Type): Add call to Null_Exclusion_Static_Checks. Verify
11309 proper usage of null exclusion in a result definition.
11310 (Process_Formals): Code cleanup and new error message.
11311 (Process_Formals): Detect incorrect application of null exclusion to
11312 non-access types.
11313 (Conforming_Types): Handle conformance between [sub]types and itypes
11314 generated for entities that have null exclusions applied to them.
11315 (Maybe_Primitive_Operation): Add an additional type retrieval when the
11316 base type is an access subtype. This case arrises with null exclusions.
11317 (New_Overloaded_Entity): Do not remove the overriden entity from the
11318 homonym chain if it corresponds with an abstract interface primitive.
11319 (Process_Formals): Replace membership test agains Incomplete_Kind with a
11320 call to the synthesized predicate Is_Incomplete_Type.
11321 (Analyze_Subprogram_Body): Check wrong placement of abstract interface
11322 primitives.
11323 (Analyze_Subprogram_Declaration): Check that abstract interface
11324 primitives are abstract or null.
11325 (Analyze_Subprogram_Specification): Remove previous check for abstract
11326 interfaces because it was not complete.
11327 (Has_Interface_Formals): Removed.
11328
113292006-10-31 Ed Schonberg <schonberg@adacore.com>
11330 Javier Miranda <miranda@adacore.com>
11331
11332 * sem_ch7.adb (Check_Anonymous_Access_Types): New procedure, subsidiary
11333 of Analyze_Package_Body, to create Itype references for anonymous
11334 access types created in the package declaration, whose designated types
11335 may have only a limited view.
11336 (Analyze_Package_Specification): For the private part of a nested
11337 package, install private_with_clauses of enclosing compilation unit if
11338 we are in its visible part.
11339 (Declare_Inherited_Private_Subprograms): Complete barrier
11340 to ensure that the primitive operation has an alias to some parent
11341 primitive. This is now required because, after the changes done for the
11342 implementation of abstract interfaces, the contents of the list of
11343 primitives has entities whose alias attribute references entities of
11344 such list of primitives.
11345 (Analyze_Package_Specification): Simplify code that handles parent units
11346 of instances and formal packages.
11347 (Uninstall_Declarations): Check the convention consistency among
11348 primitive overriding operations of a tagged record type.
11349
113502006-10-31 Robert Dewar <dewar@adacore.com>
11351 Hristian Kirtchev <kirtchev@adacore.com>
11352 Javier Miranda <miranda@adacore.com>
11353 Ed Schonberg <schonberg@adacore.com>
6f7f72f9 11354
70198b9f
AC
11355 * sem_ch8.adb: Minor error msg rewording
11356 (Undefined): When checking for misspellings, invert arguments (to get
11357 expected and found set right)
11358 (Analyze_Subprogram_Renaming): Propagate Is_Pure, Is_Preelaborated
11359 (Analyze_Generic_Renaming): Same fix
11360 (Use_One_Package): Do not take into account the internal entities of
11361 abstract interfaces during the analysis of entities that are marked
11362 as potentially use-visible.
11363 (Find_Type): Handle the case of an attribute reference for
11364 implementation defined attribute Stub_Type (simply let the analysis of
11365 the attribute reference rewrite it).
11366 (Use_One_Type, End_Use_Type): Reject a reference to a limited view of a
11367 type that appears in a Use_Type clause.
11368 (Analyze_Object_Renaming): Add support for renaming of the Priority
11369 attribute.
11370 (Find_Type): In Ada 2005, a task type can be used within its own body,
11371 when it appears in an access definition.
11372 (Analyze_Object_Renaming): Remove warning on null_exclusion.
11373 (Analyze_Object_Renaming): Introduce checks for required null exclusion
11374 in a formal object declaration or in a subtype declaration.
11375 (Analyze_Subprogram_Renaming): Add call to Check_Null_Exclusion.
11376 (Check_Null_Exclusion): New local routine to
11377 Analyze_Subprogram_Renaming. Check whether the formals and return
11378 profile of a renamed subprogram have required null exclusions when
11379 their counterparts of the renaming already impose them.
11380 (In_Generic_Scope): New local routine to Analyze_Object_Renaming.
11381 Determine whether an entity is inside a generic scope.
11382 (In_Open_Scope): First pass of documentation update.
11383 (Find_Expanded_Name): Add support for shadow entities associated with
11384 limited withed packages. This is required to handle nested packages.
11385 (Analyze_Package_Renaming): Remove the restriction imposed by AI-217
11386 that makes a renaming of a limited withed package illegal.
11387
113882006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
11389 Ed Schonberg <schonberg@adacore.com>
11390
11391 * sem_ch9.adb (Analyze_Protected_Definition): Remove call to
11392 Check_Overriding_Indicator.
11393 (Analyze_Task_Definition): Ditto.
11394 (Analyze_Protected_Type, Analyze_Task_Type): Code cleanup.
11395 (Check_Overriding_Indicator): To find overridden interface operation,
11396 examine only homonyms that have an explicit subprogram declaration, not
11397 inherited operations created by an unrelated type derivation.
11398 (Check_Overriding_Indicator): When checking for the presence of "null"
11399 in a procedure, ensure that the queried node is a procedure
11400 specification.
11401 (Matches_Prefixed_View_Profile): Add mechanism to retrieve the parameter
11402 type when the formal is an access to variable.
11403 (Analyze_Protected_Type): Add check for Preelaborable_Initialization
11404 (Analyze_Task_Type): Same addition
11405 (Analyze_Entry_Declaration): Call Generate_Reference_To_Formals, to
11406 provide navigation capabilities for entries.
11407
114082006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
11409 Ed Schonberg <schonberg@adacore.com>
11410 Javier Miranda <miranda@adacore.com>
11411 Gary Dismukes <dismukes@adacore.com>
11412
11413 * sem_disp.adb (Check_Dispatching_Operation): Do not flag subprograms
11414 inherited from an interface ancestor by another interface in the
11415 context of an instance as 'late'.
11416 (Is_Tag_Indeterminate, Propagate_Tag): Handle properly the dereference
11417 of a call to a function that dispatches on access result.
11418 (Check_Dispatching_Operation): In case of late overriding of a primitive
11419 that covers abstract interface subprograms we register it in all the
11420 secondary dispatch tables associated with abstract interfaces.
11421 (Check_Dispatching_Call): Add check that a dispatching call is not made
11422 to a function with a controlling result of a limited type. This is a
11423 current implementation restriction.
11424 (Check_Controlling_Formal): Remove bogus checks for E.2.2(14).
11425 (Check_Dispatching_Operation): Do no emit a warning if the controlling
11426 argument is an interface type that is a generic formal.
11427 (Is_Interface_Subprogram): Removed.
11428 (Check_Dispatching_Operation): If the subprogram is not a dispatching
11429 operation, check the formals to handle the case in which it is
11430 associated with an abstract interface type.
11431
114322006-10-31 Robert Dewar <dewar@adacore.com>
11433 Ed Schonberg <schonberg@adacore.com>
11434
11435 * sem_elab.ads, sem_elab.adb (Check_Elab_Assign): New procedure
11436 Add new calls to this procedure during traversal
11437 (Activate_Elaborate_All_Desirable): Do not set elaboration flag on
11438 another unit if expansion is disabled.
11439
114402006-10-31 Robert Dewar <dewar@adacore.com>
11441
11442 * sem_eval.adb (Compile_Time_Compare): Make use of information from
11443 Current_Value in the conditional case, to evaluate additional
11444 comparisons at compile time.
11445
114462006-10-31 Ed Schonberg <schonberg@adacore.com>
11447 Hristian Kirtchev <kirtchev@adacore.com>
11448 Javier Miranda <miranda@adacore.com>
11449
11450 * sem_type.adb (Add_One_Interp): If node is an indirect call, preserve
11451 subprogram type to provide better diagnostics in case of ambiguity.
11452 (Covers): Handle coverage of formal and actual anonymous access types in
11453 the context of generic instantiation.
11454 (Covers/Interface_Present_In_Ancestors): Use the base type to manage
11455 abstract interface types; this is required to handle concurrent types
11456 with discriminants and abstract interface types.
11457 (Covers): Include type coverage of both regular incomplete subtypes and
11458 incomplete subtypes of incomplete type visibles through a limited with
11459 clause.
11460
114612006-10-31 Robert Dewar <dewar@adacore.com>
11462 Hristian Kirtchev <kirtchev@adacore.com>
11463 Ed Schonberg <schonberg@adacore.com>
6f7f72f9
EB
11464
11465 * sem_util.ads, sem_util.adb (Enter_Name): Exclude -gnatwh warning
70198b9f
AC
11466 messages for entities in packages which are not used.
11467 (Collect_Synchronized_Interfaces): New procedure.
11468 (Overrides_Synchronized_Primitive): New function.
11469 (Denotes_Discriminant): Extend predicate to apply to task types.
11470 Add missing continuation marks in error msgs
11471 (Unqualify): New function for removing zero or more levels of
11472 qualification from an expression. There are numerous places where this
11473 ought to be used, but we currently only deal properly with zero or one
11474 level.
11475 (In_Instance); The analysis of the actuals in the instantiation of a
11476 child unit is not within an instantiation, even though the parent
11477 instance is on the scope stack.
11478 (Safe_To_Capture_Value): Exclude the case of variables that are
11479 renamings.
11480 (Check_Obsolescent): Removed
11481 (Is_Aliased_View): A reference to an enclosing instance in an aggregate
11482 is an aliased view, even when rewritten as a reference to the target
11483 object in an assignment.
11484 (Get_Subprogram_Entity): New function
11485 (Known_To_Be_Assigned): New function
11486 (Type_Access_Level): Compute properly the access level of a return
11487 subtype that is an anonymous access type.
11488 (Explain_Limited_Type): Correct use of "\" for continuation messages.
11489 (Is_Transfer): The new extended_return_statement causes a transfer of
11490 control.
11491 (Has_Preelaborable_Initialization): New function
11492 (Has_Null_Exclusion): New function. Given a node N, determine whether it
11493 has a null exclusion depending on its Nkind.
11494 Change Is_Lvalue to May_Be_Lvalue
11495 (May_Be_Lvalue): Extensive additional code to deal with subprogram
11496 arguments (IN parameters are not Lvalues, IN OUT parameters are).
11497 (Safe_To_Capture_Value): Extend functionality so it can be used for
11498 the current value condition case.
11499 (Has_Compatible_Alignment): New function
11500 (Is_Dependent_Component_Of_Mutable_Object): Revise the tests for mutable
11501 objects to handle the Ada 2005 case, where aliasedness no longer implies
11502 that the object is constrained. In particular, for dereferenced names,
11503 the designated object must be assumed to be unconstrained.
11504 (Kill_Current_Values): Properly deal with the case where we encounter
11505 a loop in the scope chain.
11506 (Safe_To_Capture_Value): Do not let a loop stop us from capturing
11507 a value.
11508 (Compile_Time_Constraint_Error): Improve error message in error case
11509
11510 * exp_ch13.adb (Expand_N_Freeze_Entity): Remove the freezing node
11511 associated with entities of abstract interface primitives.
11512 Call Apply_Address_Clause_Check instead of Apply_Alignment_Check
11513
115142006-10-31 Robert Dewar <dewar@adacore.com>
11515
11516 * s-osinte-tru64.adb:
11517 Mark Asm statements Volatile to prevent warnings (seems a
11518 reasonable change anyway)
11519 Fixes new warnings
11520
11521 * s-mastop-irix.adb: Add Volatile to Asm statements
11522 Suppresses warning, and seems appropriate in any case
11523
11524 * s-osinte-vms.adb: Add Volatile to Asm statement
11525
11526 * s-vaflop-vms-alpha.adb: Add Volatile to Asm statements
11527
11528 * exp_code.ads, exp_code.adb (Asm_Input_Value): Note that Error can be
11529 returned.
11530 Add call to Check_Code_Statement
11531
115322006-10-31 Robert Dewar <dewar@adacore.com>
11533 Ed Schonberg <schonberg@adacore.com>
11534 Bob Duff <duff@adacore.com>
11535
11536 * sinfo.ads, sinfo.adb (Set_Synchronized_Present,
11537 Synchronized_Present): Add Formal_Derived_Type_Definition and
11538 Private_Extension_Declaration to the list of assertions.
11539 (Is_Entry_Barrier_Function): New flag
11540 (Has_Self_Reference): New flag on aggregates, to indicate that they
11541 contain a reference to the enclosing type, inserted through a default
11542 initialization.
11543 (Next_Rep_Item): Move from Node4 to Node5.
11544 (Entity): Add this field for N_Attribute_Definition_Clause.
11545 (Comes_From_Extended_Return_Statement): New flag on N_Return_Statement
11546 (N_Return_Object_Declaration): Remove this node kind. We now use
11547 N_Object_Declaration instead.
11548 (Actual_Designated_Subtype): Move to a different place to make room in
11549 N_Extended_Return_Statement.
11550 (Procedure_To_Call): Move to a different place to make room in
11551 N_Extended_Return_Statement.
11552 (Return_Type): Removed this field to make room in return statements
11553 (both kinds).
11554 (Return_Statement_Entity): New field in return statements, in part to
11555 replace Return_Type, and in part to support the fact that return
11556 statements are now pushed on the scope stack during semantic analysis.
11557 (Return_Object_Declarations): New field to support extended return
11558 statements.
11559 (N_Extended_Return_Statement): New node for extended_return_statement
11560 nonterminal.
11561 (N_Return_Object_Declaration): New node for part of
11562 extended_return_statement nonterminal. Needed because all the necessary
11563 fields won't fit in N_Extended_Return_Statement.
11564 Generic_associations now carry the Box_Present flag, to indicate a
11565 default for an actual in a partially parametrized formal package.
11566
6f7f72f9 11567 * snames.h, snames.ads, snames.adb: Add definition for Validity_Check
70198b9f
AC
11568 (Preset_Names): Add entries for Priority_Specific_Dispatching pragma
11569 and for the new predefined dispatching policies: EDF_Across_Priorities,
11570 Non_Preemptive_Within_Priorities, and Round_Robin_Within_Priorities.
11571 Introduce new name Stub_Type for implementation defined attribute.
11572 Add pragma Preelaborable_Initialization
11573 Add entry for Priority attribute.
11574 Add Pragma_Wide_Character_Encoding
11575 (Get_Convention_Name): Given a convention id, this function returns the
11576 corresponding name id from the names table.
11577
115782006-10-31 Ed Schonberg <schonberg@adacore.com>
11579 Robert Dewar <dewar@adacore.com>
11580 Bob Duff <duff@adacore.com>
11581
11582 * sprint.adb (Sprint_Node_Actual, case Parameter_Specification): Do not
11583 print null exclusion twice in the case of an access definition,
11584 Implement new -gnatL switch
11585 Remove N_Return_Object_Declaration. We now use
11586 N_Object_Declaration instead. Implement the case for
11587 N_Extended_Return_Statement. Alphabetize the cases.
11588 Add cases for new nodes N_Extended_Return_Statement and
11589 N_Return_Object_Declaration. The code is not yet written.
11590 Update the output for N_Formal_Object_Declaration
11591 and N_Object_Renaming_Declaration.
11592 (Write_Itype): Account for the case of a modular integer subtype whose
11593 base type is private.
11594
115952006-10-31 Arnaud Charlet <charlet@adacore.com>
11596
11597 * s-restri.ads, s-restri.adb: Mark this package as Preelaborate.
11598 Remove elaboration code, now done in the binder.
11599
11600 * s-rident.ads: Make this unit Preelaborate.
11601 (No_Restrictions): New constant used to clean up code and follow
11602 preelaborate constraints.
11603
11604 * s-stalib.adb:
11605 Add System.Restrictions dependence, referenced directly from the
11606 binder generated file.
11607
116082006-10-31 Gary Dismukes <dismukes@adacore.com>
11609
11610 * s-scaval.adb (Initialize): Add new Boolean flag AFloat that is set
11611 True when AAMP extended floating-point is in use (48-bit). Change type
11612 ByteLF to ByteLLF, add new array type ByteLF and condition the size of
11613 the two byte array types on AFloat. Change type of IV_Ilf overlay
11614 variable from Byte8 to ByteLF. Add appropriate initializations of
11615 floating-point overlays for AAMP cases.
11616
116172006-10-31 Javier Miranda <miranda@adacore.com>
11618
11619 * s-tpoben.ads, s-tpoben.adb, s-taprob.ads, s-taprob.adb
11620 (Get_Ceiling): New subprogram that returns
11621 the ceiling priority of the protected object.
11622 (Set_Ceiling): New subprogram that sets the new ceiling priority of
11623 the protected object.
11624
11625 * s-tarest.adb: (Create_Restricted_Task): Fix potential CE.
11626
11627 * s-taskin.ads, s-taskin.adb: (Storage_Size): New function.
11628
116292006-10-31 Jose Ruiz <ruiz@adacore.com>
11630
11631 * s-tpobop.adb (Requeue_Call): Introduce a dispatching point when
11632 requeuing to the same protected object to give higher priority tasks
11633 the opportunity to execute.
11634
116352006-10-31 Robert Dewar <dewar@adacore.com>
11636
11637 * widechar.adb (Is_Start_Of_Wide_Char): In case of brackets encoding,
11638 add more precise check for the character sequence that follows '[' to
11639 avoid possible confusion in case if '[' is the last character of a
11640 string literals.
11641 (Scan_Wide): Always allow brackets encoding
11642
116432006-10-31 Olivier Hainque <hainque@adacore.com>
11644
11645 * s-stchop.ads: make this unit preelaborate. This is desirable in
11646 general and made mandatory by the use of this unit by s-taprop which
11647 is itself preelaborate.
11648
11649 * s-stchop-vxworks.adb (Set_Stack_Info, Task_Descriptor type): Add
11650 Td_Events component.
11651
116522006-10-31 Vincent Celier <celier@adacore.com>
11653
11654 * a-dirval-vms.adb (Invalid_Character): Specify that digits are allowed
11655 in file names.
11656
116572006-10-31 Vincent Celier <celier@adacore.com>
11658
11659 * a-direct.ads, a-direct.adb (Search): New procedure in Ada 2005
11660
116612006-10-31 Vincent Celier <celier@adacore.com>
11662
11663 * makegpr.adb (Check_Compilation_Needed): Take into account path names
11664 with spaces.
11665 (Check_Compilation_Needed): When checking a C or C++ source, do not
11666 resolve symbolic links.
11667 (Display_Command): New Boolean parameter Ellipse, defaulted to False.
11668 When not in verbose mode and Ellipse is True, display "..." for the
11669 first argument with Display set to False.
11670 (Build_Global_Archive): Always set Display True for the first object
11671 file. Call Display_Command with Ellipse set to True.
11672
116732006-10-31 Matt Heaney <heaney@adacore.com>
11674
11675 * a-crbtgo.ads: Commented each subprogram
11676
11677 * a-crbtgo.adb: Added reference to book from which algorithms were
11678 adapted.
11679
6f7f72f9 11680 * a-crbtgk.ads, a-crbtgk.adb (Generic_Insert_Post): pass flag to
70198b9f
AC
11681 indicate which child.
11682 (Generic_Conditional_Insert): changed parameter name from "Success" to
11683 "Inserted".
11684 (Generic_Unconditional_Insert_With_Hint): improved algorithm
11685
11686 * a-coorse.adb (Replace_Element): changed parameter name in call to
11687 conditional insert operation.
11688
11689 * a-convec.adb, a-coinve.adb (Insert): removed obsolete comment
11690
11691 * a-cohama.adb (Iterate): manipulate busy-bit here, instead of in
11692 Generic_Iteration
11693
11694 * a-ciorse.adb (Replace_Element): changed parameter name in call to
11695 conditional insert operation.
11696
11697 * a-cihama.adb (Iterate): manipulate busy-bit here, instead of in
11698 Generic_Iteration.
11699
11700 * a-cidlli.ads, a-cidlli.adb (Splice): Position param is now mode in
11701 instead of mode inout.
11702
11703 * a-chtgop.adb (Adjust): modified comments to reflect current AI-302
11704 draft
11705 (Generic_Read): preserve existing buckets array if possible
11706 (Generic_Write): don't send buckets array length anymore
11707
11708 * a-cdlili.ads, a-cdlili.adb (Splice): Position param is now mode in
11709 instead of mode inout.
11710
11711 * a-cihase.adb (Difference): iterate over smaller of Tgt and Src sets
11712 (Iterate): manipulate busy-bit here, instead of in Generic_Iteration
11713
11714 * a-cohase.adb (Difference): iterate over smaller of Tgt and Src sets
11715 (Iterate): manipulate busy-bit here, instead of in Generic_Iteration
11716 (Replace_Element): local operation is now an instantiation
11717
11718 * a-chtgke.ads, a-chtgke.adb (Generic_Conditional_Insert): manually
11719 check current length.
11720 (Generic_Replace_Element): new operation
11721
117222006-10-31 Doug Rupp <rupp@adacore.com>
11723
11724 * g-trasym-vms-alpha.adb: Dummy_User_Act_Proc: New function.
11725 Call TBK$SYMBOLIZE without omitting parameters.
11726
117272006-10-31 Vincent Celier <celier@adacore.com>
11728
11729 * symbols-processing-vms-ia64.adb,
11730 symbols-processing-vms-alpha.adb (Process): Do not include symbols
11731 that come from generic instantiations in bodies.
11732
117332006-10-31 Pat Rogers <rogers@adacore.com>
11734
11735 * a-rttiev.ads, a-rttiev.adb:
11736 This is a significant redesign primarily for the sake of automatic
11737 timer task termination but also to fix a design flaw.
11738 Therefore we are now using an RTS lock, instead of a protected
11739 object, to provide mutual exclusion to the queue of pending events
11740 and the type Timing_Event is no longer a protected type.
11741
117422006-10-31 Robert Dewar <dewar@adacore.com>
11743 Cyrille Comar <comar@adacore.com>
11744 Ben Brosgol <brosgol@adacore.com>
11745
11746 * debug.adb: Update flags documentation
11747
6f7f72f9
EB
11748 * gnat_ugn.texi: Add documentation for new -gnatwq switch
11749 Clean up documentation for several other warning switches
11750 Clarify how task stack size can be specified with various
11751 versions of Windows.
11752 Add note that -gnatVo includes ranges including loops
70198b9f
AC
11753 Add documentation for -gnatL switch
11754 Add note on elaboration warning for initializing variables
11755 Add documentation for new -gnatwt warning switch
11756 Document new form of pragma Warnings (On|Off, string)
11757 Add comment on use of pragma Warnings to control warnings
11758 Add documentation for -gnatjnn switch
11759 Modify section on interfacing with C for VMS 64-bit.
11760 Add doc for -gnatVe/E
11761 Add documentation of new warning flags -gnatww/-gnatwW
11762 Add warnings about address clause overlays to list of warnings
11763 (Exception Handling Control): Document that the option --RTS must be
11764 used consistently for gcc and gnatbind.
11765 Clarify that inlining is not always possible
11766 Update documentation on pragma Unchecked_Union.
11767
11768 * gnat_rm.texi:
11769 Add documentation for new extended version of pragma Obsolescent
11770 Add documentation for implementation defined attribute 'Stub_Type.
11771 Add note on use of Volatile in asm statements
11772 Add documentation on use of pragma Unreferenced in context clause
11773 Document new form of pragma Warnings (On|Off, pattern)
11774 Document pragma Wide_Character_Encoding
11775 Add note that pragma Restrictions (No_Elaboration_Code) is only fully
11776 enforced if code generation is active.
11777 Add section on pragma Suppress to document GNAT specific check
11778 Alignment_Check
11779 Clarify difference between No_Dispatching_Calls & No_Dispatch.
11780 Add documentation for pragma Restrictions (No_Elaboration_Code)
11781
11782 * gnat-style.texi:
11783 Add comments on layout of subprogram local variables in the
11784 presence of nested subprograms.
11785
6f7f72f9 11786 * ug_words: Resync.
70198b9f
AC
11787
11788 * elists.ads: Minor reformatting
11789 Node returns Node_Or_Entity_Id (doc change only)
11790
11791 * xgnatugn.adb: Replace ACADEMICEDITION with GPLEDITION
11792
11793 * g-arrspl.ads (Create): Update comments.
11794
11795 * sem.ads: Add details on the handling of the scope stack.
11796
6f7f72f9 11797 * usage.adb: Update documentation.
70198b9f
AC
11798
11799 * validsw.ads, validsw.adb:
11800 Add definition of Validity_Check_Components and implement -gnatVe/E
11801
6f7f72f9 11802 * vms_data.ads: Add missing VMS qualifiers.
70198b9f
AC
11803
11804 * s-addope.ads: Add documentation on overflow and divide by zero
11805
118062006-10-31 Robert Dewar <dewar@adacore.com>
11807 Thomas Quinot <quinot@adacore.com>
11808 Arnaud Charlet <charlet@adacore.com>
11809
11810 * fmap.adb: Put routines in alpha order
11811
11812 * g-boumai.ads: Remove redundant 'in' keywords
11813
11814 * g-cgi.adb: Minor reformatting
11815
11816 * g-cgi.ads: Remove redundant 'in' keywords
11817
11818 * get_targ.adb: Put routines in alpha order
11819
11820 * prj-attr.ads: Minor reformatting
11821
11822 * s-atacco.ads: Minor reformatting
11823
11824 * scn.adb: Put routines in alpha order
11825
11826 * sinput-l.adb: Minor comment fix
11827
11828 * sinput-p.adb: Minor comment fix
11829
11830 * s-maccod.ads: Minor reformatting
11831
11832 * s-memory.adb: Minor reformatting
11833
11834 * s-htable.adb: Fix typo in comment.
11835
11836 * s-secsta.adb: Minor comment update.
11837
11838 * s-soflin.adb: Minor reformatting
11839
11840 * s-stoele.ads:
11841 Add comment about odd qualification in Storage_Offset declaration
11842
11843 * s-strxdr.adb:
11844 Remove unnecessary 'in' keywords for formal parameters.
11845
11846 * treeprs.adt: Minor reformatting
11847
11848 * urealp.adb: Put routines in alpha order
11849
11850 * s-wchcon.ads, s-wchcon.adb (Get_WC_Encoding_Method): New version
11851 taking string.
11852
11853 * s-asthan-vms-alpha.adb: Remove redundant 'in' keywords
11854
11855 * g-trasym-vms-ia64.adb: Remove redundant 'in' keywords
11856
11857 * env.c (__gnat_unsetenv): Unsetenv is unavailable on LynxOS, so
11858 workaround as on other platforms.
11859
11860 * g-eacodu-vms.adb: Remove redundant 'in' keywords
11861 * g-expect-vms.adb: Remove redundant 'in' keywords
11862
11863 * gnatdll.adb (Add_Files_From_List): Handle Name_Error and report a
11864 clear error message if the list-of-files file cannot be opened.
11865
11866 * g-thread.adb (Unregister_Thread_Id): Add use type Thread_Id so the
11867 equality operator is always visible.
11868
11869 * lang.opt: Woverlength-strings: New option.
11870
11871 * nmake.adt:
11872 Update copyright, since nmake.ads and nmake.adb have changed.
11873
11874 * osint-b.ads, osint-b.adb (Time_From_Last_Bind): removed function .
11875 (Binder_Output_Time_Stamps_Set): removed.
11876 (Old_Binder_Output_Time_Stamp): idem.
11877 (New_Binder_Output_Time_Stamp): idem.
11878 (Recording_Time_From_Last_Bind): idem.
11879 (Recording_Time_From_Last_Bind): Make constant.
11880
11881 * output.ads, output.adb (Write_Str): Allow LF characters
11882 (Write_Spaces): New procedure
11883
11884 * prepcomp.adb (Preproc_Data_Table): Change Increment from 5% to 100%
11885
11886 * inline.adb: Minor reformatting
11887
11888 * s-asthan-vms-alpha.adb: Remove redundant 'in' keywords
11889
11890 * s-mastop-vms.adb: Remove redundant 'in' keywords
11891
11892 * s-osprim-vms.adb: Remove redundant 'in' keywords
11893
11894 * s-trafor-default.adb: Remove redundant 'in' keywords
11895
11896 * 9drpc.adb: Remove redundant 'in' keywords
11897
11898 * s-osinte-mingw.ads: Minor reformatting
11899
11900 * s-inmaop-posix.adb: Minor reformatting
11901
11902 * a-direio.ads: Remove quotes from Compile_Time_Warning message
11903
11904 * a-exexda.adb: Minor code reorganization
11905
11906 * a-filico.adb: Minor reformatting
11907
11908 * a-finali.adb: Minor reformatting
11909
11910 * a-nudira.ads: Remove quote from Compile_Time_Warning message
11911
11912 * a-numeri.ads: Minor reformatting
11913
11914 * a-sequio.ads: Remove quotes from Compile_Time_Warning message
11915
11916 * exp_pakd.ads: Fix obsolete comment
11917
11918 * a-ztenau.adb, a-ztenio.adb, a-wtenau.adb, a-tienau.adb,
11919 a-wtenio.adb (Put): Avoid assuming low bound of string is 1.
11920 Probably not a bug, but certainly neater and more efficient.
11921
11922 * a-tienio.adb: Minor reformatting
11923
11924 * comperr.adb (Compiler_Abort): Call Cancel_Special_Output at start
11925 Avoid assuming low bound of string is 1.
11926
11927 * gnatbind.adb: Change Bindusg to package and rename procedure as
11928 Display, which now ensures that it only outputs usage information once.
11929 (Scan_Bind_Arg): Avoid assuming low bound of string is 1.
11930
11931 * g-pehage.adb (Build_Identical_Keysets): Replace use of 1 by
11932 Table'First.
11933
11934 * g-regpat.adb (Insert_Operator): Add pragma Warnings (Off) to kill
11935 warning.
11936 (Match): Add pragma Assert to ensure that Matches'First is zero
11937
11938 * g-regpat.ads (Match): Document that Matches lower bound must be zero
11939
11940 * makeutl.adb (Is_External_Assignment): Add pragma Assert's to check
11941 documented preconditions (also kills warnings about bad indexes).
11942
11943 * mdll.adb (Build_Dynamic_Library): Avoid assumption that Afiles'First
11944 is 1.
11945 (Build_Import_Library): Ditto;
11946
11947 * mdll-utl.adb: (Gnatbind): Avoid assumption that Alis'First = 1
11948
11949 * rtsfind.adb (RTE_Error_Msg): Avoid assuming low bound of string is 1.
11950
11951 * sem_case.adb (Analyze_Choices): Add pragma Assert to check that
11952 lower bound of choice table is 1.
11953
11954 * sem_case.ads (Analyze_Choices): Document that lower bound of
11955 Choice_Table is 1.
11956
11957 * s-imgdec.adb (Set_Decimal_Digits): Avoid assuming low bound of
11958 string is 1.
11959
11960 * uintp.adb (Init_Operand): Document that low bound of Vec is always 1,
11961 and add appropriate Assert pragma to suppress warnings.
11962
11963 * atree.h, atree.ads, atree.adb
11964 Change Elist24 to Elist25
11965 Add definitions of Field28 and Node28
11966 (Traverse_Field): Use new syntactic parent table in sinfo.
11967
11968 * cstand.adb: Change name Is_Ada_2005 to Is_Ada_2005_Only
11969
11970 * itypes.adb: Change name Is_Ada_2005 to Is_Ada_2005_Only
11971
11972 * exp_tss.adb: Put routines in alpha order
11973
11974 * fe.h: Remove redundant declarations.
11975
c79efc4d 119762006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
ed41063a 11977
c79efc4d
RÁE
11978 * utils.c (builtin_function): Rename to gnat_builtin_function.
11979 Move common code to add_builtin_function.
11980 * misc.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
11981 gnat_builtin_function.
11982 * gigi.h (builtin_function): Rename to gnat_builtin_function.
11983 Change the signature.
11984
a8384928
BM
119852006-10-16 Brooks Moses <bmoses@stanford.edu>
11986
11987 * Makefile.in: Add TEXI2PDF definition.
11988 * Make-lang.in: Add "ada.pdf" target.
11989
2285b053
KH
119902006-10-03 Kazu Hirata <kazu@codesourcery.com>
11991
11992 * decl.c, utils.c: Fix comment typos.
c0a69967
KH
11993 * utils.c: Fix a typo.
11994
b55e7f34
EB
119952006-09-28 Eric Botcazou <ebotcazou@adacore.com>
11996
11997 * decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set "const" flag
11998 on "pure" Ada subprograms if SJLJ exceptions are used.
11999 * trans.c (Handled_Sequence_Of_Statements_to_gnu): Set TREE_NO_WARNING
12000 on the declaration node of JMPBUF_SAVE.
12001 * utils.c (init_gigi_decls): Set DECL_IS_PURE on the declaration nodes
12002 of Get_Jmpbuf_Address_Soft and Get_GNAT_Exception.
12003 * utils2.c (build_call_0_expr): Do not set TREE_SIDE_EFFECTS.
12004
d2b40c09
LG
120052006-08-20 Laurent GUERBY <laurent@guerby.net>
12006
7a197678
EB
12007 PR ada/28716
12008 g-socket.adb (Bind_Socket): Call Set_Address.
12009
41d9adc7
EB
120102006-09-15 Eric Botcazou <ebotcazou@adacore.com>
12011
12012 PR ada/15802
12013 * decl.c (same_discriminant_p): New static function.
12014 (gnat_to_gnu_entity) <E_Record_Type>: When there is a parent
12015 subtype and we have discriminants, fix up the COMPONENT_REFs
12016 for the discriminants to make them reference the corresponding
12017 fields of the parent subtype after it has been built.
12018
21cc3719
RS
120192006-09-15 Roger Sayle <roger@eyesopen.com>
12020
12021 PR ada/18817
12022 * utils.c (max_size): Perform constant folding of (A ? B : C) - D
12023 into A ? B - D : C - D when calculating the size of a MINUS_EXPR.
12024
6f2789da
OH
120252006-09-13 Olivier Hainque <hainque@adacore.com>
12026
12027 PR ada/29025
12028 * trans.c (gnat_gimplify_expr) <ADDR_EXPR>: When taking the address
12029 of a SAVE_EXPR, just make the operand addressable/not-readonly and
12030 let the common gimplifier code make and propagate a temporary copy.
12031 (call_to_gnu): Clarify the use of SAVE_EXPR for not addressable
12032 out/in-out actuals and defer setting the addressable/readonly bits
12033 to the gimplifier.
12034
efaa616e
EB
120352006-09-13 Eric Botcazou <ebotcazou@adacore.com>
12036
12037 PR ada/28591
12038 * decl.c (components_to_record): Defer emitting debug info for the
12039 record type associated with the variant until after we are sure to
12040 actually use it.
12041
2655f1c6
EB
120422006-09-13 Eric Botcazou <ebotcazou@adacore.com>
12043
12044 PR ada/21952
12045 * gigi.h (gnat_internal_attribute_table): Declare.
12046 * misc.c (LANG_HOOKS_ATTRIBUTE_TABLE): Define to above.
12047 * utils.c (gnat_internal_attribute_table): New global variable.
12048 (builtin_function): Always call decl_attributes on the builtin.
12049 (handle_const_attribute): New static function.
12050 (handle_nothrow_attribute): Likewise.
12051
48779194
VR
120522006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
12053
12054 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
12055
8df7d439
EB
120562006-06-23 Olivier Hainque <hainque@adacore.com>
12057
12058 * misc.c (gnat_type_max_size): Look at TYPE_ADA_SIZE if we have
12059 not been able to get a constant upper bound from TYPE_SIZE_UNIT.
12060
83fdc7c4 120612006-06-20 James A. Morrison <phython@gcc.gnu.org>
6f7f72f9 12062 Eric Botcazou <ebotcazou@adacore.com>
83fdc7c4
JM
12063
12064 PR ada/18692
12065 * Make-lang.in: Add check-gnat to lang_checks. Rename existing
12066 check-gnat into check-acats.
12067
5f516f59
KB
120682006-06-17 Karl Berry <karl@gnu.org>
12069
6f7f72f9 12070 * gnat-style.texi (@dircategory): Use "Software development"
5f516f59
KB
12071 instead of "Programming", following the Free Software Directory.
12072
ce0d1b88
JDA
120732006-06-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12074
12075 PR ada/27944
12076 * s-taprop-hpux-dce.adb: Delete redundant 'with System.Parameters'.
12077
8c60f779
LG
120782006-06-06 Laurent GUERBY <laurent@guerby.net>
12079
6f7f72f9
EB
12080 PR ada/27769
12081 mlib-utl.adb: Use Program_Name.
12082
ce2e12c2
KH
120832006-05-28 Kazu Hirata <kazu@codesourcery.com>
12084
12085 * decl.c, env.c, gigi.h, init.c, initialize.c, raise-gcc.c,
12086 sem_ch13.adb, sysdep.c, targtyps.c, tb-alvxw.c, tracebak.c,
12087 trans.c, utils.c: Fix comment typos. Follow spelling
12088 conventions.
12089 * gnat_rm.texi, gnat_ugn.texi, : Fix typos. Follow spelling
12090 conventions.
12091
ba4ac682
EB
120922006-05-19 Nicolas Setton <setton@adacore.com>
12093
12094 * misc.c (gnat_dwarf_name): New function.
12095 (LANG_HOOKS_DWARF_NAME): Define to it.
12096
05b44921
L
120972006-05-14 H.J. Lu <hongjiu.lu@intel.com>
12098
12099 * Make-lang.in (ada/decl.o): Replace target.h with $(TARGET_H).
12100 (ada/misc.o): Likewise.
12101 (ada/utils.o): Likewise.
12102
a3bd7058
AJ
121032006-04-08 Aurelien Jarno <aurel32@debian.org>
12104
12105 * Makefile.in: Add Ada support for GNU/kFreeBSD.
12106 * s-osinte-kfreebsd-gnu.ads: New file.
12107
ad3a7ce3
CD
121082006-03-29 Carlos O'Donell <carlos@codesourcery.com>
12109
12110 * Make-lang.in: Rename docdir to gcc_docdir.
12111
936a6fa7
EB
121122006-03-04 Eric Botcazou <ebotcazou@adacore.com>
12113
12114 * gigi.h (get_ada_base_type): Delete.
12115 * utils2.c (get_ada_base_type): Likewise.
12116 * trans.c (convert_with_check): Operate in the real base type.
12117
93f978b7
RK
121182006-03-03 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12119
12120 * uintp.adb (Num_Bits): Handle Uint_Int_First specially.
12121
434aeebb
RS
121222006-03-02 Richard Sandiford <richard@codesourcery.com>
12123
12124 * utils.c (create_var_decl): Use have_global_bss_p when deciding
12125 whether to make the decl common.
12126
6f7f72f9 12127