โŒ About FreshRSS

Normal view

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

ada: Fix crash on concurrent type aggregate

28 November 2023 at 08:11
ada: Fix crash on concurrent type aggregate

Before this patch, the compiler would fail to examine the corresponding
record types of concurrent types when building aggregate components.
This patch fixes this, and adds a precondition and additional documentation
on the subprogram that triggered the crash, as it never makes sense
to call it with a concurrent type.

gcc/ada/

	* exp_aggr.adb (Initialize_Component): Use corresponding record
	types of concurrent types.
	* exp_util.ads (Make_Tag_Assignment_From_Type): Add precondition
	and extend documentation.

Co-authored-by: Javier Miranda <[email protected]>
  • [DBH] gcc/ada/exp_aggr.adb
  • [DBH] gcc/ada/exp_util.ads
  • 28 November 2023 at 08:11

ada: Fix Ada.Text_IO.Delete with "encoding=8bits" form

23 October 2023 at 14:02
ada: Fix Ada.Text_IO.Delete with "encoding=8bits" form

Before this patch, on Windows, file with non-ASCII Latin1 names could be created
with Ada.Text_IO.Create by passing "encoding=8bits" through the Form
parameter and a Latin1-encoded string through the Name parameter,
but calling Ada.Text_IO.Delete on them raised an illegitimate exception.

This patch fixes this by making the wrappers of the unlink system function
aware of the encoding value passed through the Form parameter. It also
removes an unnecessary curly-brace block.

gcc/ada/

	* adaint.c (__gnat_unlink): Add new parameter and fix text
	conversion on Windows. Remove unnecessary curly braces.
	* adaint.h (__gnat_unlink): Add new parameter.
	* libgnat/i-cstrea.ads (unlink): Adapt to __gnat_unlink signature
	change.
	* libgnat/i-cstrea.adb (unlink): New Subprogram definition.
	* libgnat/s-crtl.ads (unlink): Adapt to __gnat_unlink signature
	change.
	* libgnat/s-fileio.adb (Delete): Pass encoding argument to unlink.
  • [DBH] gcc/ada/adaint.c
  • [DBH] gcc/ada/adaint.h
  • [DBH] gcc/ada/libgnat/i-cstrea.adb
  • [DBH] gcc/ada/libgnat/i-cstrea.ads
  • [DBH] gcc/ada/libgnat/s-crtl.ads
  • [DBH] gcc/ada/libgnat/s-fileio.adb
  • 23 October 2023 at 14:02

ada: Fix Ada.Directories.Modification_Time on Windows

16 October 2023 at 15:09
ada: Fix Ada.Directories.Modification_Time on Windows

Before this patch, Ada.Directories.Modification_Time called
GetFileAttributesExA under the hood on Windows. That would sometimes
fail to work with files whose names were non-ASCII.

This patch replaces the call to GetFileAttributesExA with a call to
GetFileAttributesEx preceded by an encoding scheme conversion, as is
done in other functions of the run-time library. This fixes the issues
that were observed with the previous implementations.

gcc/ada/

	* adaint.c (__gnat_file_time): Fix Windows version.
  • [DBH] gcc/ada/adaint.c
  • 16 October 2023 at 15:09

ada: Fix documentation of -gnatwc

12 October 2023 at 09:31
ada: Fix documentation of -gnatwc

-gnatwc has been correctly emitting warnings for expressions outside
of tests for a while, but its documentation in the user's guide had
never been updated to reflect that. Also, the documentation used
"conditional expressions" to designate boolean expressions, but
"conditional expressions" has been defined by Ada 2012 to designate
if expressions and case expressions. This patch fixes those issues.

gcc/ada/

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
	-gnatwc documentation.
	* gnat_ugn.texi: Regenerate.
  • [DBH] gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
  • [DBH] gcc/ada/gnat_ugn.texi
  • 12 October 2023 at 09:31

ada: Seize opportunity to reuse List_Length

29 September 2023 at 09:25
ada: Seize opportunity to reuse List_Length

This patch is intended as a readability improvement. It doesn't
change the behavior of the compiler.

gcc/ada/

	* sem_ch3.adb (Constrain_Array): Replace manual list length
	computation by call to List_Length.
  • [DBH] gcc/ada/sem_ch3.adb
  • 29 September 2023 at 09:25

ada: Tweak internal subprogram in Ada.Directories

29 September 2023 at 10:35
ada: Tweak internal subprogram in Ada.Directories

The purpose of this patch is to work around false-positive warnings
emitted by GNAT SAS (also known as CodePeer). It does not change
the behavior of the modified subprogram.

gcc/ada/

	* libgnat/a-direct.adb (Start_Search_Internal): Tweak subprogram
	body.
  • [DBH] gcc/ada/libgnat/a-direct.adb
  • 29 September 2023 at 10:35

ada: Tweak documentation comments

25 September 2023 at 09:14
ada: Tweak documentation comments

The concept of extended nodes was retired at the same time Gen_IL
was introduced, but there was a reference to that concept left over
in a comment. This patch removes that reference.

Also, the description of the field Comes_From_Check_Or_Contract was
incorrectly placed in a section for fields present in all nodes in
sinfo.ads. This patch fixes this.

gcc/ada/

	* atree.ads, nlists.ads, types.ads: Remove references to extended
	nodes. Fix typo.
	* sinfo.ads: Likewise and fix position of
	Comes_From_Check_Or_Contract description.
  • [DBH] gcc/ada/atree.ads
  • [DBH] gcc/ada/nlists.ads
  • [DBH] gcc/ada/sinfo.ads
  • [DBH] gcc/ada/types.ads
  • 25 September 2023 at 09:14

ada: Fix filesystem entry filtering

19 September 2023 at 07:45
ada: Fix filesystem entry filtering

This patch fixes the behavior of Ada.Directories.Search when being
requested to filter out regular files or directories. One of the
configurations in which that behavior was incorrect was that when the
caller requested only the regular and special files but not the
directories, the directories would still be returned.

gcc/ada/

	* libgnat/a-direct.adb: Fix filesystem entry filtering.
  • [DBH] gcc/ada/libgnat/a-direct.adb
  • 19 September 2023 at 07:45

ada: Fix spurious warning emissions

21 August 2023 at 11:35
ada: Fix spurious warning emissions

Before this patch, warnings handled by `Sem_Warn.Check_References` were
erroneously emitted in some cases. Here is an example of a program that,
when compiled with the `-gnatwu` switch, triggered the bug:

    procedure Main is
       package T is
          A : Integer;
       end T;
    begin
       T.A := 7;
    end Main;

The following message was emitted:

   main.adb:3:07: warning: variable "A" is never read and never assigned [-gnatwu]

This patch mitigates the issue by restricting the cases in which
`Sem_Warn.Check_References` is called for package specifications.

Note that the recursive calls in `Sem_Warn.Check_References` can be used
to convince oneself that this patch does not remove legitimate warnings
for non-library-level package specifications.

gcc/ada/

	* sem_ch7.adb (Analyze_Package_Declaration): Restrict calls to
	`Sem_Warn.Check_References` and adjust comment accordingly.
  • [DBH] gcc/ada/sem_ch7.adb
  • 21 August 2023 at 11:35
โŒ
โŒ