Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GCC release notes, aka, Ada is still alive!

367 views
Skip to first unread message

Fernando Oleo Blanco

unread,
Oct 11, 2021, 2:41:22 PM10/11/21
to
Hi everybody,

I have been meaning to write this message for a long while, so here it goes.

Reading Phoronix [1] for years, I noticed that with every new GCC
release, the biggest changes to GCC and its languages were mentioned.
However, Ada was pretty much never present.

Today, just a few moments ago in #netbsd, someone asked whether Ada had
finally been dropped out of GCC... I am not even mad. GCC's release
notes have not mentioned Ada since GCC 8 [2], [3], [4]; and even in GCC
7 and 8 the notes are minute.

So I would like to ask whether someone would like to help me get release
notes ready. I am not saying that I will be doing much, but I would like
to breath some fresh air into how Ada is seen and how much people hear
about it.

I personally do not like marketing since good products stand on their
merits, not slogans or shininess. But there is no reason to not put
publicly what is going on.

Yes, AdaCore has been doing some very nice followups to the development
of Ada in their blog [5]. But the people that go there, are already
aware of Ada. And since AdaCore is phasing out their GNAT CE system in
favour of FSF builds (included in Alire), the relevance of GCC's
releases grows.

Note, I am not implying that AdaCore should write the releases. They are
doing the bulk of work in GNAT, so I do not think they _need_ to do
more. Personally I am glad with what they are doing, but of course, they
can write the releases if they so want.

I am specially saddened by the fact that GCC has gotten a substantial
amount of support for Ada 2022 and it is not even mentioned. No wonder
why people think Ada is dead!

So, if you have any recommendation, or would like to help, then you are
more than welcomed!

P.S.: I am already doing my part GNAT in NetBSD x86_64 is working! It
has 9 failed ACATS tests, but they are minor. A thousand thanks go to J.
Marino and Tobiasu for their enormous help in #ada. Today I will see if
I can compile it for armv6 and run it on my RPi!

[1] https://www.phoronix.com/scan.php?page=home
[2] https://gcc.gnu.org/gcc-7/changes.html
[3] https://gcc.gnu.org/gcc-8/changes.html
[4] https://gcc.gnu.org/gcc-9/changes.html
[5] https://blog.adacore.com/
--
Fernando Oleo Blanco
https://irvise.xyz

Fabien Chouteau

unread,
Oct 12, 2021, 8:54:34 AM10/12/21
to
On Monday, October 11, 2021 at 8:41:22 PM UTC+2, Fernando Oleo Blanco wrote:
> Yes, AdaCore has been doing some very nice followups to the development
> of Ada in their blog [5]. But the people that go there, are already
> aware of Ada.

Most, if not all, of what is in this blog post [1] is applicable to GNAT/GCC 11.

[1] https://blog.adacore.com/ada-202x-support-in-gnat

Tero Koskinen

unread,
Oct 12, 2021, 2:37:28 PM10/12/21
to
Hi,
I guess the main point of Fernando was that it would be nice if someone
could add all the new changes between versions 11 and 12 to
https://gcc.gnu.org/gcc-12/changes.html before GCC 12 is released.

gcc-X/changes.html traditionally lists some items for all other language
frontends, but there is never anything for Ada.

The git history for gcc-12/changes.html page is visible at
https://gcc.gnu.org/git/?p=gcc-wwwdocs.git;a=history;f=htdocs/gcc-12/changes.html;h=f38fd2bef9c4089369e6f9315590ebffd8b24f5c;hb=HEAD

(that is gcc-wwwdocs repository at gcc.gnu.org/git).

Maybe someone with enough free time (and enough knowledge about the
changes) could take look and provide a patch for GCC web page
maintainers?

Yours,
Tero

Tero Koskinen

unread,
Oct 12, 2021, 3:28:10 PM10/12/21
to
On Tue, 12 Oct 2021 21:37:25 +0300
Tero Koskinen <tero.k...@iki.fi> wrote:
> gcc-wwwdocs repository at gcc.gnu.org/git
> Maybe someone

I decided to try an example. I must confess that I don't know where
the cutoff point for GCC 11 was and what it changes actually did
(the commit log messages aren't that clear if you don't actually
follow the development of GCC/GNAT/Ada in detail).

But here is the idea what the patches could looks like. (And yes,
I know that comp.lang.ada is totally incorrect place for the diff.)

From e9e0e6e178b0acb0021abe6aaadaa14ef00e8d2f Mon Sep 17 00:00:00 2001
From: Tero Koskinen <tero.k...@iki.fi>
Date: Tue, 12 Oct 2021 22:23:01 +0300
Subject: [PATCH] [GCC-12] Mention some GNAT changes.

---
htdocs/gcc-12/changes.html | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html
index f38fd2be..5710ad8f 100644
--- a/htdocs/gcc-12/changes.html
+++ b/htdocs/gcc-12/changes.html
@@ -109,7 +109,17 @@ a work-in-progress.</p>
</li>
</ul>

-<!-- <h3 id="ada">Ada</h3> -->
+<h3 id="ada">Ada</h3>
+
+<ul>
+ <li>Implemented or improved following Ada 202x features:
+ <ul>
+ <li>AI12-0195: overriding class-wide pre/postconditions</li>
+ <li>AI12-0212: Container aggregates</li>
+ </ul>
+ </li>
+ <li>Marked gnatfind and gnatxref tools as obsolete</li>
+</ul>

<!-- <h3 id="brig">BRIG (HSAIL)</h3> -->

--
2.31.1

Fernando Oleo Blanco

unread,
Oct 13, 2021, 12:32:33 PM10/13/21
to
Thank you to everybody that commented on the topic.

We could use the Changelog present in the gcc/ada directory to triage
commits more precisely (credit goes to Stéphane).

On 12.10.21 21:28, Tero Koskinen wrote:
> I decided to try an example. I must confess that I don't know where
> the cutoff point for GCC 11 was and what it changes actually did
> (the commit log messages aren't that clear if you don't actually
> follow the development of GCC/GNAT/Ada in detail).

To be honest, we could try to write the changelog for GCC 11 with the
information given by Fabien (AdaCore) and what we find out. If for
whatever reason the GCC people do not want to make large changes to the
already released changelog, we could compile a larger list for GCC 12.

I think the most important aspects are:
- Ada 2022, which has a long list of changes on its own;
- Improvements to systems (VxWorks, RTMS, etc), as it shows that Ada is
present in more places than what meets the eye;
- Deprecations and fixes;
- General improvements in the library, SPARK and with the GCC ecosystem.
I think Ada has somewhat acceptable support for OpenMP, which was
improved in the past few years, for example. It has also been increasing
SPARK support in the libraries.

> But here is the idea what the patches could looks like. (And yes,
> I know that comp.lang.ada is totally incorrect place for the diff.)

I think that the diff included is a good example of what it would be to
write the main changes.

I want to sign up for GCC's gcc mailing list (general discussion) and
ask the GCC people what would be the preferred way to move forward. Hey,
maybe they would like to have Ada changelogs for all past releases! If I
hear anything back I will tell you.

Though if someone wants to start, I see no problem on sharing diffs
here. Not the most ideal place, but it is a good forum to share ideas.

Regards,

Simon Wright

unread,
Oct 13, 2021, 3:59:51 PM10/13/21
to
Fernando Oleo Blanco <irvi...@irvise.xyz> writes:

> - General improvements in the library, SPARK and with the GCC
> ecosystem. I think Ada has somewhat acceptable support for OpenMP,
> which was improved in the past few years, for example. It has also
> been increasing SPARK support in the libraries.

Not sure how to work SPARK into a GCC note, since it's not part of the
GCC ecosystem?

"There's extensive support for possible static analysis of code,
e.g. via SPARK, in the form of annotations that can optionally be
compiled as runtime assertions."

Stéphane Rivière

unread,
Oct 14, 2021, 4:24:22 AM10/14/21
to
Hope this time, it will working... (random problem here sending to NG
groups)

Hi Fernando,

> So, if you have any recommendation, or would like to help, then you are
> more than welcomed!

I second that and I would like to help, if I may.

According to gcc-mirror on github, Ada basecode is above C++

C 47.7%
Ada 17.5%
C++ 14.9%
Go 7.4%
GCC Machine Description 4.7%
Fortran 2.4%
Other 5.4%

git clone https://github.com/gcc-mirror/gcc

git log > log.gcc (volume: 124M)
cat log.gcc | grep adacore > log.ada (1M, ~25K contribs since 2005)
grep "\[Ada\]" ./log.gcc > log-oneliner.ada (190K, 3200 lines)

grep -B 2 -A 20 adacore log.gcc > log-detail.ada
cat log-detail.ada | grep -B 2 -A 20 [ada] log.gcc > log-changes.ada


It seems that everything is there to create a more or less relevant
changelog.

But Adalog's comments are one thing, sorted and relevant informations
for developers are another.

A raw copy/paste would be useless, we would have to analyze the
changelog to give back useful information.

We should also edit a changelog for each GCC release. The above metrics
were made on master.

J-P. Rosen

unread,
Oct 14, 2021, 6:31:00 AM10/14/21
to
Le 14/10/2021 à 10:24, Stéphane Rivière a écrit :
> But Adalog's comments are one thing, sorted and relevant informations
> for developers are another.
I think you meant Adacore's...

--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52
https://www.adalog.fr

Fernando Oleo Blanco

unread,
Oct 20, 2021, 4:42:24 AM10/20/21
to
The discussion thread on the GCC ML has been started. You can find it
here: https://gcc.gnu.org/pipermail/gcc/2021-October/237600.html

Do not hesitate to add any comments!

Regards,

Fernando Oleo Blanco

unread,
Oct 20, 2021, 4:15:01 PM10/20/21
to
On 20.10.21 10:42, Fernando Oleo Blanco wrote:
> The discussion thread on the GCC ML has been started. You can find it
> here: https://gcc.gnu.org/pipermail/gcc/2021-October/237600.html
>
> Do not hesitate to add any comments!
>
> Regards,

Okay, we already had a couple of comments and they cover everything
needed. Arnaud has volunteered to be the "supervisor". So here is my
plan: crowdsourcing! :D

I would like to write a (simple) list of changes for each version here,
on the CLA. If you want to add something __copy__ (do not quote) the
list from the previous person/reply/modification and add your proposed
changes. You can also make comments if you would like anything changed.
If "CHECK" or if "TODO" are written by somebody, it means that something
needs to be checked or that it needs to be expanded; respectively. After
the list is mostly completed, we could create a patch(es) to send to
GCC. The quality of this list is not going to be great, treat it like a
checklist. Obviously, if you want to discuss something about the
changes, do quote the relevant section.

So here it goes:

BEGIN CHANGES_LIST

GCC 12
-
- Further library improvements in both quality and performance.
- The use of contracts has been extended in the "Ada library" allowing
for further checks at runtime or a deeper static analysis with the SPARK
prover.
- Further improvements to embedded systems such as VxWorks and RTMS.
CHECK maybe be more specific/generic.

GCC 11
- Introduction of the -gnat2022 flag in gnatmake. It enables newer
features present in Ada 2022 (still to be ratified). This features are
still experimental.
- The parallel keyword is still unsupported.
- TODO name the additional features. See [1], obviously, with some
code examples.
- Addition of the Jorvik profile. CHECK, see [2], maybe code examples?
- Additional non-standard features [3]. CHECK if this applies to GCC 11
or 12.
- A bug was fixed were previous GCC versions allowed XXX construct
CHECK. This is not allowed by the standard. Some software was making use
of XXX (which is, once again, not allowed) and it has to be patched.
- General library improvements in both clarity and performance.
- The use of contracts has been extended in the "Ada library" allowing
for further checks at runtime or a deeper static analysis with the SPARK
prover.
- Further improvements to embedded systems such as VxWorks and RTMS.
CHECK maybe be more specific/generic.


GCC 10
- Some Ada 2022 features are available already with the use of the
-gnatX (gnat eXtensions switch).
-

GCC 9
-
-


PREVIOUS GCCs (I will not explicitly name them, feel free to add info here)


References
[1] https://blog.adacore.com/ada-202x-support-in-gnat
[2] https://blog.adacore.com/introduction-to-jorvik
[3] https://blog.adacore.com/going-beyond-ada-2022

END CHANGES_LIST

Simon Wright

unread,
Oct 20, 2021, 5:19:31 PM10/20/21
to
Fernando Oleo Blanco <irvi...@irvise.xyz> writes:

> GCC 11
> - Introduction of the -gnat2022 flag in gnatmake.

Actually -gnat2020. Still like that in a May revision of GCC 12.

Supports 128-bit integers & unsigneds. Not sure if this is on all
platforms.

Fernando Oleo Blanco

unread,
Oct 21, 2021, 10:39:44 AM10/21/21
to
In GNAT CE 2021 there is -gnat2022... Maybe they still need to upstream
those changes. I tried it with GCC 11.2.0. You are right, it is -gnat2020.

However, it is not documented! I ran gnatmake alone to see what flags it
outputs and -gnat2020 is not listed... Maybe this is a bug. It should
definitely be fixed if the changelog is going to have it listed as an
option.

Simon Wright

unread,
Oct 21, 2021, 2:22:52 PM10/21/21
to
Fernando Oleo Blanco <irvi...@irvise.xyz> writes:

> On 20.10.21 23:19, Simon Wright wrote:
>> Fernando Oleo Blanco <irvi...@irvise.xyz> writes:
>>
>>> GCC 11
>>> - Introduction of the -gnat2022 flag in gnatmake.
>> Actually -gnat2020. Still like that in a May revision of GCC 12.
>> Supports 128-bit integers & unsigneds. Not sure if this is on all
>> platforms.
>>
>
> In GNAT CE 2021 there is -gnat2022... Maybe they still need to
> upstream those changes. I tried it with GCC 11.2.0. You are right, it
> is -gnat2020.
>
> However, it is not documented! I ran gnatmake alone to see what flags
> it outputs and -gnat2020 is not listed... Maybe this is a bug. It
> should definitely be fixed if the changelog is going to have it listed
> as an option.

With today's GCC 12.0.0, gnatmake -h has -gnat2022.

Fernando Oleo Blanco

unread,
Oct 25, 2021, 2:47:08 PM10/25/21
to
Diff: add to GCC 12 the deletion of gnatxref and gnatfind (the patch was
posted today in the ML). The -gnat2020 has been commented too in GCC 10
and -gnat2022 in GCC 12. Also, we have explicit permission by Arnaud to
copy as much code as necessary from AdaCore's blog.

LIST OF CHANGES

GCC 12
- Introduction of the -gnat2022 flag in gnatmake (-gnat2020 is a
deprecated alias).
- gnatfind and gnatxref tools have been deleted. They have been
deprecated for years and have been substituted by gprbuild tools.
- Further library improvements in both quality and performance.
- The use of contracts has been extended in the "Ada library" allowing
for further checks at runtime or a deeper static analysis with the SPARK
prover.
- Further improvements to embedded systems such as VxWorks and RTMS.
CHECK maybe be more specific/generic.

GCC 11
- Better Ada 2022 support. The parallel keyword is still unsupported.
- TODO name the additional features. See [1], obviously, with some code
examples.
- Addition of the Jorvik profile. CHECK, see [2], maybe code examples?
- Additional non-standard features [3]. CHECK if this applies to GCC 11
or 12.
- A bug was fixed were previous GCC versions allowed XXX construct
CHECK. This is not allowed by the standard. Some software was making use
of XXX (which is, once again, not allowed) and it has to be patched.
- General library improvements in both clarity and performance.
- The use of contracts has been extended in the "Ada library" allowing
for further checks at runtime or a deeper static analysis with the SPARK
prover.
- Further improvements to embedded systems such as VxWorks and RTMS.
CHECK maybe be more specific/generic.


GCC 10
- Introduction of the -gnat2020 flag in gnatmake (-gnat2020 is
deprecated alias). It enables newer features present in Ada 2022 (still
to be ratified). This features are still experimental.
- Some Ada 2022 features are available already with the use of the
-gnatX (gnat eXtensions switch).
-

GCC 9
-
-

Cheers,

Stephen Leake

unread,
Oct 27, 2021, 12:52:33 PM10/27/21
to
Fernando Oleo Blanco <irvi...@irvise.xyz> writes:

> - gnatfind and gnatxref tools have been deleted. They have been
> deprecated for years and have been substituted by gprbuild tools.

What "gprbuild tool" replaces gnatxref?

From recent discussions in an AdaCore ticket, the replacement for
gnatxref is libadalang, either via the LSP Ada Language Server, or a
similar custom wrapper.

--
-- Stephe

Fernando Oleo Blanco

unread,
Oct 28, 2021, 4:30:49 AM10/28/21
to
Oh, indeed. I thought only about gnatfind. Sorry for the confusion!

I am also looking for a way for everybody to help write the patches.
Maybe a github with the original changes.html document and the modified
one... I will see. I do not want to force anybody to use a specific
platform. Email patches will always be welcome.

Regards,
0 new messages