public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [wwwdocs] Add Ada's changelog entry
@ 2022-04-04 21:28 Fernando Oleo Blanco
  2022-04-04 21:51 ` Eric Botcazou
  0 siblings, 1 reply; 13+ messages in thread
From: Fernando Oleo Blanco @ 2022-04-04 21:28 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]

Hi,

this is my first patch to GCC, if there is anything off, please, say
so. I have used the default HTML formatting that comes with Emacs. I
have created the patch using the `git format-patch` utility.

One thing that may not be allowed (I am not aware of any rule against
it but still) is the amount of nesting in the lists. The section "Ada
2022 extensions" has list that nest up to "level 3". I am pointing this
out, since no other section has 3 levels of nesting, all have at most 2.

I have also added a formatted code example. I do not know if this is
allowed. Trying to explain Pattern Matching without a minimal example
is not something that I am capable of.

The patch contains verbatim expressions from
https://blog.adacore.com/going-beyond-ada-2022 but Arnaud has provided
explicit permission to do so; he is also a GCC contributor.

I have not signed any legal requirements to contribute to GCC, however,
this is just a documentation patch. I am not providing any content
that is new or improving a part of GCC, so this should not be necessary.

Regards,
--
Fernando Oleo Blanco
https://irvise.xyz

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-Ada-s-entry-in-the-v12-changelog.patch --]
[-- Type: text/x-patch; name=0001-Add-Ada-s-entry-in-the-v12-changelog.patch, Size: 4504 bytes --]

From a2f402895ab87713882adf2faef6f587d6d01264 Mon Sep 17 00:00:00 2001
From: Fernando Oleo Blanco <irvise@irvise.xyz>
Date: Mon, 4 Apr 2022 23:22:43 +0200
Subject: [PATCH] Add Ada's entry in the v12 changelog

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

diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html
index 4e1f6b0f..16351697 100644
--- a/htdocs/gcc-12/changes.html
+++ b/htdocs/gcc-12/changes.html
@@ -183,7 +183,84 @@ a work-in-progress.</p>
   </li>
 </ul>
 
-<!-- <h3 id="ada">Ada</h3> -->
+<h3 id="ada">Ada</h3>
+<ul>
+  <li>Ada 2022
+  <ul>
+    <li>Added the <code>-gnat2022</code> flag to indicate strict Ada
+      2022 compliance. The old <code>-gnat2020</code> flag is now
+      deprecated.</li>
+    <li>Support for Big Numbers (Annex G) has seen continuous
+      improvements. It is now cosidered complete. It is also proven to
+      be correct through the use of contracts and SPARK.</li>
+    <li>Continuous improvements to the Ada 2022 standard since GCC
+      11. The main missing feature is support for the new
+      <code>parallel</code> keyword. However, some initial support has
+      already been put in place.</li>
+    <li>Greatly improved compile time support. More functions can now
+      have the <code>with Static</code> aspect and can be used in more
+      contexts.</li>
+  </ul>
+  </li>
+  <li>Ada 2022 extensions. The use of the <code>-gnatX</code> flag is
+    necessary to access these features as they are not considered
+    stable or standard.
+  <ul>
+    <li>Fixed lower bound for unconstrained arrays.
+    <ul>
+      <li><code>type Matrix is array (Natural range 0 .. <>, Natural
+        range 0 .. <>) of Integer;</code> is now valid.</li>
+      <li>Subtypes can also specify a lower bound: <code>subtype
+        String_1 is String (1 .. <>);</code>. Boundaries from slices
+        will "slide" to the correct lower bound of the subtype.</li>
+    </ul>
+    </li>
+    <li>Generalized <code>Object.Operand</code> notation. The follwing
+      code is now valid <code>V.Add_Element(42);</code>,
+      with <code>V</code> being a vector, for example.</li>
+    <li>Additional <code>when</code> constructs. Keywords
+      <code>return</code>, <code>goto</code> and <code>raise</code>
+      can now use <code>when</code> in addition to the existing
+      <code>exit when</code>. The following expression is therefore
+      now valid <code>raise Constraint_Error with "Element is null"
+      when Element = null;</code></li>
+    <li>Pattern matching</li>
+    <ul>
+      <li>The <code>case</code> statement has been extended to cover
+        records and arrays as well as finer grained casing on scalar
+        types. In the future it is expected to provide more compile
+        time guarantees when accessing discriminated fields. Case
+        exhaustion is supported for patter matching. An example would
+        be <code><pre>
+type Sign is (Neg, Zero, Pos);
+
+function Multiply (S1, S2 : Sign) return Sign is
+  (case (S1, S2) is
+     when (Neg, Neg) | (Pos, Pos) => Pos,
+     when (Zero, <>) | (<>, Zero) => Zero,
+     when (Neg, Pos) | (Pos, Neg) => Neg);
+        </pre></code></li>
+    </ul>
+    </li>
+  </ul>
+  </li>
+  <li><code>gnatfind</code> and <code>gnatxref</code>, which were
+    already deprecated, have been removed.</li>
+  <li>Support for <code>128bit</code> integers has beed added.</li>
+  <li>Greatly expanded code covered by contracts. Thanks to this work,
+    there are now several Ada standard libraries fully proven in SPARK
+    which means they have no runtime nor logical errors. They are
+    mostly numeric and string handling libraries.</li>
+  <li>Enable return-slot optimization for <code>Pure</code>
+    functions.</li>
+  <li>General optimizations, improvements and additions to the
+    standard library. Performance, correctness and in some cases
+    stability was improved. Memory pools have also seen some minor
+    enhancements.</li>
+  <li>Improvements to embedded-RTOS targets such as RTEMS, VxWorks and
+    QNX. Older targets were removed or cleaned.</li>
+  <li>Added some <a href="https://gcc.gnu.org/onlinedocs/gnat_rm/Security-Hardening-Features.html#Security-Hardening-Features">hardening features</a>.</li>
+</ul>
 
 <h3 id="c-family">C family</h3>
 <ul>
-- 
2.35.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-04-16 13:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 21:28 [wwwdocs] Add Ada's changelog entry Fernando Oleo Blanco
2022-04-04 21:51 ` Eric Botcazou
2022-04-04 22:00   ` Fernando Oleo Blanco
2022-04-05  6:05     ` Arnaud Charlet
2022-04-05  6:30       ` Richard Biener
2022-04-05 17:05         ` Fernando Oleo Blanco
2022-04-11  9:00           ` Arnaud Charlet
2022-04-14  4:44             ` Gerald Pfeifer
2022-04-14  5:04               ` Gerald Pfeifer
2022-04-15 13:55                 ` Fernando Oleo Blanco
2022-04-16 13:22                   ` Gerald Pfeifer
2022-04-16 13:04               ` Gerald Pfeifer
2022-04-14 14:57       ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).