โŒ About FreshRSS

Normal view

There are new articles available, click to refresh the page.
Before yesterdaygcc/ada history

Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

28 November 2023 at 13:56
Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

In gcc/ada/adaint.c(__gnat_get_file_names_case_sensitive), the current
assumption for __APPLE__ is that file names are case-insensitive
unless __arm__ or __arm64__ are defined, in which case file names are
declared case-sensitive.

The associated comment is
  "By default, we suppose filesystems aren't case sensitive on
  Windows and Darwin (but they are on arm-darwin)."

This means that on aarch64-apple-darwin, file names are treated as
case-sensitive, which is not the default case.

The true default position is that macOS file systems are
case-insensitive, iOS file systems are case-sensitive.

Apple provide a header file <TargetConditionals.h> which permits a
compile-time check for the compiler target (e.g. OSX vs IOS); if
TARGET_OS_IOS is defined as 1, this is a build for iOS.

2023-11-22  Simon Wright  <[email protected]>

gcc/ada/

	PR ada/111909
	* adaint.c
	(__gnat_get_file_names_case_sensitive): Split out the __APPLE__
	check and remove the checks for __arm__, __arm64__. For Apple,
	file names are by default case-insensitive unless TARGET_OS_IOS is
	set.

Signed-off-by: Simon Wright <[email protected]>
  • [DBH] gcc/ada/adaint.c
  • 28 November 2023 at 13:56

Fix PR ada/111813 (Inconsistent limit in Ada.Calendar.Formatting)

16 October 2023 at 13:32
Fix PR ada/111813 (Inconsistent limit in Ada.Calendar.Formatting)

The description of the second Value function (returning Duration) (ARM 9.6.1(87)
doesn't place any limitation on the Elapsed_Time parameter's value, beyond
"Constraint_Error is raised if the string is not formatted as described for Image, or
the function cannot interpret the given string as a Duration value".

It would seem reasonable that Value and Image should be consistent, in that any
string produced by Image should be accepted by Value. Since Image must produce
a two-digit representation of the Hours, there's an implication that its
Elapsed_Time parameter should be less than 100.0 hours (the ARM merely says
that in that case the result is implementation-defined).

The current implementation of Value raises Constraint_Error if the Elapsed_Time
parameter is greater than or equal to 24 hours.

This patch removes the restriction, so that the Elapsed_Time parameter must only
be less than 100.0 hours.

2023-10-15 Simon Wright <[email protected]>

	PR ada/111813
gcc/ada/
	* libgnat/a-calfor.adb (Value (2)): Allow values of
	parameter Elapsed_Time greater than or equal to 24 hours, by doing
	the hour calculations in Natural rather than Hour_Number (0 ..
	23). Calculate the result directly rather than by using Seconds_Of
	(whose Hour parameter is of type Hour_Number).
	If an exception occurs of type Constraint_Error, re-raise it
	rather than raising a new CE.

gcc/testsuite/
	* gnat.dg/calendar_format_value.adb: New test.
  • [DBH] gcc/ada/libgnat/a-calfor.adb
  • 16 October 2023 at 13:32
โŒ
โŒ