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

* Re: [wwwdocs] Add Ada's changelog entry
  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
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Botcazou @ 2022-04-04 21:51 UTC (permalink / raw)
  To: Fernando Oleo Blanco; +Cc: gcc-patches

> 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.

Thanks for your contribution.  Small nit:

+  <li>Support for <code>128bit</code> integers has beed added.</li>

The support was already present in GCC 11, the criterion being the use of the 
'Max_Integer_Size attribute in system.ads.

-- 
Eric Botcazou



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

* Re: [wwwdocs] Add Ada's changelog entry
  2022-04-04 21:51 ` Eric Botcazou
@ 2022-04-04 22:00   ` Fernando Oleo Blanco
  2022-04-05  6:05     ` Arnaud Charlet
  0 siblings, 1 reply; 13+ messages in thread
From: Fernando Oleo Blanco @ 2022-04-04 22:00 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc-patches

Am Mon, 04 Apr 2022 23:51:24 +0200
schrieb "Eric Botcazou" <botcazou@adacore.com>:

> Thanks for your contribution.  Small nit:
>
> +  <li>Support for <code>128bit</code> integers has beed added.</li>
>
> The support was already present in GCC 11, the criterion being the
> use of the 'Max_Integer_Size attribute in system.ads.
>
> --
> Eric Botcazou
>
>

Thank you for the feedback. Should I remove it and resuply the patch or
can you/GCC maintainers do the modification before merging?

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


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

* Re: [wwwdocs] Add Ada's changelog entry
  2022-04-04 22:00   ` Fernando Oleo Blanco
@ 2022-04-05  6:05     ` Arnaud Charlet
  2022-04-05  6:30       ` Richard Biener
  2022-04-14 14:57       ` Jonathan Wakely
  0 siblings, 2 replies; 13+ messages in thread
From: Arnaud Charlet @ 2022-04-05  6:05 UTC (permalink / raw)
  To: Fernando Oleo Blanco; +Cc: Eric Botcazou, gcc-patches

> Thank you for the feedback. Should I remove it and resuply the patch or
> can you/GCC maintainers do the modification before merging?

Can you please resubmit it?

I'll let others comment on the need to sign a contributor agreement, my
understanding is that this is unavoidable, whether you're contributing
code or documentation doesn't change this need AFAIU.

Arno

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

* Re: [wwwdocs] Add Ada's changelog entry
  2022-04-05  6:05     ` Arnaud Charlet
@ 2022-04-05  6:30       ` Richard Biener
  2022-04-05 17:05         ` Fernando Oleo Blanco
  2022-04-14 14:57       ` Jonathan Wakely
  1 sibling, 1 reply; 13+ messages in thread
From: Richard Biener @ 2022-04-05  6:30 UTC (permalink / raw)
  To: Arnaud Charlet; +Cc: Fernando Oleo Blanco, GCC Patches, Eric Botcazou

On Tue, Apr 5, 2022 at 8:06 AM Arnaud Charlet via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> > Thank you for the feedback. Should I remove it and resuply the patch or
> > can you/GCC maintainers do the modification before merging?
>
> Can you please resubmit it?
>
> I'll let others comment on the need to sign a contributor agreement, my
> understanding is that this is unavoidable, whether you're contributing
> code or documentation doesn't change this need AFAIU.

If you have git write access you should add yourself in the DCO section
in the MAINTAINERS file.  Otherwise it has been said it's enough to
explicitly state in mail that you are contributing this change under
the Developer's Certificate of Origin Version 1.1
(https://gcc.gnu.org/dco.html).

Richard.

>
> Arno

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

* Re: [wwwdocs] Add Ada's changelog entry
  2022-04-05  6:30       ` Richard Biener
@ 2022-04-05 17:05         ` Fernando Oleo Blanco
  2022-04-11  9:00           ` Arnaud Charlet
  0 siblings, 1 reply; 13+ messages in thread
From: Fernando Oleo Blanco @ 2022-04-05 17:05 UTC (permalink / raw)
  To: Richard Biener; +Cc: Arnaud Charlet, GCC Patches, Eric Botcazou

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

Am Tue, 5 Apr 2022 08:30:32 +0200
schrieb "Richard Biener" <richard.guenther@gmail.com>:

> If you have git write access you should add yourself in the DCO
> section in the MAINTAINERS file.  Otherwise it has been said it's
> enough to explicitly state in mail that you are contributing this
> change under the Developer's Certificate of Origin Version 1.1
> (https://gcc.gnu.org/dco.html).
>
> Richard.
>
> >
> > Arno

Thank you all for your feedback and guidance. I have taken Eric's
feedback and deleted the relevant entry.

Since I do not have write access, I cannot add myself to the
MAINTAINERS file. Therefore, I want to explicitly state that I am
submitting these patches under the DCO. I have read and accept the
indications and requirements listed in (https://gcc.gnu.org/dco.html).

There are two patches, the original one, with the DCO signature at the
end and a second one, with the DCO signature too, with Eric's feedback.

Should anything else be required, do not hesitate to indicate so.

Signed-off-by: Fernando Oleo Blanco <irvise@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: 4563 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 1/2] 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
Signed-off-by: Fernando Oleo Blanco <irvise@irvise.xyz>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-Correct-128bit-it-was-added-in-GCC-11.patch --]
[-- Type: text/x-patch; name=0002-Correct-128bit-it-was-added-in-GCC-11.patch, Size: 1018 bytes --]

From d9c1233cff4122b6cfa328688fb88646effc8cfa Mon Sep 17 00:00:00 2001
From: Fernando Oleo Blanco <irvise@irvise.xyz>
Date: Tue, 5 Apr 2022 18:32:45 +0200
Subject: [PATCH 2/2] Correct 128bit, it was added in GCC 11

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

diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html
index 16351697..d9b1e3ac 100644
--- a/htdocs/gcc-12/changes.html
+++ b/htdocs/gcc-12/changes.html
@@ -246,7 +246,6 @@ function Multiply (S1, S2 : Sign) return Sign is
   </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
-- 
2.35.1
Signed-off-by: Fernando Oleo Blanco <irvise@irvise.xyz>

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

* Re: [wwwdocs] Add Ada's changelog entry
  2022-04-05 17:05         ` Fernando Oleo Blanco
@ 2022-04-11  9:00           ` Arnaud Charlet
  2022-04-14  4:44             ` Gerald Pfeifer
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaud Charlet @ 2022-04-11  9:00 UTC (permalink / raw)
  To: Fernando Oleo Blanco
  Cc: Richard Biener, Arnaud Charlet, GCC Patches, Eric Botcazou

> Thank you all for your feedback and guidance. I have taken Eric's
> feedback and deleted the relevant entry.
> 
> Since I do not have write access, I cannot add myself to the
> MAINTAINERS file. Therefore, I want to explicitly state that I am
> submitting these patches under the DCO. I have read and accept the
> indications and requirements listed in (https://gcc.gnu.org/dco.html).
> 
> There are two patches, the original one, with the DCO signature at the
> end and a second one, with the DCO signature too, with Eric's feedback.
> 
> Should anything else be required, do not hesitate to indicate so.

Thank you, I've just merged your contribution.

Arno

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

* Re: [wwwdocs] Add Ada's changelog entry
  2022-04-11  9:00           ` Arnaud Charlet
@ 2022-04-14  4:44             ` Gerald Pfeifer
  2022-04-14  5:04               ` Gerald Pfeifer
  2022-04-16 13:04               ` Gerald Pfeifer
  0 siblings, 2 replies; 13+ messages in thread
From: Gerald Pfeifer @ 2022-04-14  4:44 UTC (permalink / raw)
  To: Fernando Oleo Blanco, Arnaud Charlet; +Cc: gcc-patches, Eric Botcazou

On Mon, 4 Apr 2022, Fernando Oleo Blanco via Gcc-patches wrote:
> 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 am not familiar with that Emacs mode, but < and > are special characters 
in HTML and have to be written as &lt; (less than) and &gt; (greater than) 
respectively.

On Mon, 11 Apr 2022, Arnaud Charlet via Gcc-patches wrote:
> Thank you, I've just merged your contribution.

This is the first batch of fixes. Pushed.

Gerald


commit 67c72bb30309882ce465519e97fb14592d18ff2c
Author: Gerald Pfeifer <gerald@pfeifer.com>
Date:   Wed Apr 13 22:43:05 2022 -0600

    gcc-12: Properly escape < and >.

diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html
index bd9e5122..057d1274 100644
--- a/htdocs/gcc-12/changes.html
+++ b/htdocs/gcc-12/changes.html
@@ -205,10 +205,10 @@ a work-in-progress.</p>
   <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><code>type Matrix is array (Natural range 0 .. &lt;&gt;,
+	Natural range 0 .. &lt;&gt;) 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
+        String_1 is String (1 .. &lt;&gt;);</code>. Boundaries from slices
         will "slide" to the correct lower bound of the subtype.</li>
     </ul>
     </li>

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

* Re: [wwwdocs] Add Ada's changelog entry
  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:04               ` Gerald Pfeifer
  1 sibling, 1 reply; 13+ messages in thread
From: Gerald Pfeifer @ 2022-04-14  5:04 UTC (permalink / raw)
  To: Fernando Oleo Blanco, Arnaud Charlet; +Cc: gcc-patches, Eric Botcazou

On Wed, 13 Apr 2022, Gerald Pfeifer wrote:
> This is the first batch of fixes. Pushed.

Hmm, there is one issue that confused me a bit. What did you want to
relay by the following?

   +    <li>Pattern matching</li>
   +    <ul>
   +      <li>The <code>case</code> statement has been extended to cover

Currently that is a <ul> within a <ul>, which does not work. Did you
mean to skip the </li> and have that after the nested <ul>?

Gerald

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

* Re: [wwwdocs] Add Ada's changelog entry
  2022-04-05  6:05     ` Arnaud Charlet
  2022-04-05  6:30       ` Richard Biener
@ 2022-04-14 14:57       ` Jonathan Wakely
  1 sibling, 0 replies; 13+ messages in thread
From: Jonathan Wakely @ 2022-04-14 14:57 UTC (permalink / raw)
  To: Arnaud Charlet; +Cc: gcc-patches

On 05/04/22 06:05 +0000, Arnaud Charlet wrote:
>> Thank you for the feedback. Should I remove it and resuply the patch or
>> can you/GCC maintainers do the modification before merging?
>
>Can you please resubmit it?
>
>I'll let others comment on the need to sign a contributor agreement, my
>understanding is that this is unavoidable, whether you're contributing
>code or documentation doesn't change this need AFAIU.

Nothing is needed for changes which are not "legally significant
changes", see https://www.gnu.org/prep/maintain/html_node/Legally-Significant.html

For legally significant changes we require either a copyright
assignment to the FSF *or* DCO sign-off, which can be done by adding
yourself to the DCO section of the MAINTAINERS file, or as described at
https://gcc.gnu.org/dco.html


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

* Re: [wwwdocs] Add Ada's changelog entry
  2022-04-14  5:04               ` Gerald Pfeifer
@ 2022-04-15 13:55                 ` Fernando Oleo Blanco
  2022-04-16 13:22                   ` Gerald Pfeifer
  0 siblings, 1 reply; 13+ messages in thread
From: Fernando Oleo Blanco @ 2022-04-15 13:55 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Arnaud Charlet, gcc-patches, Eric Botcazou

Am Wed, 13 Apr 2022 23:04:17 -0600 (MDT)
schrieb "Gerald Pfeifer" <gerald@pfeifer.com>:

> On Wed, 13 Apr 2022, Gerald Pfeifer wrote:
> > This is the first batch of fixes. Pushed.
>
> Hmm, there is one issue that confused me a bit. What did you want to
> relay by the following?
>
>    +    <li>Pattern matching</li>
>    +    <ul>
>    +      <li>The <code>case</code> statement has been extended to
> cover
>
> Currently that is a <ul> within a <ul>, which does not work. Did you
> mean to skip the </li> and have that after the nested <ul>?
>
> Gerald

Hi Gerald,

thank you for your comments. As you have picked up, HTML is not my
strongest language.

I did not know that "<" and ">" had to scaped in HTML, I will try to
remember that.

Regarding the nested <ul>. Since I did not know HTML, I looked at how
nested structure/lists are generated. Since the changelog uses
sequences of <li> and <ul> to indent/create a nested list, so I did. I
wanted to have a "title" (Pattern matching) and then have the
explanation with the code. Therefore, I copied the <li>, <ul> sequence
to get another level of nesting.

I checked my results by opening the file in Firefox (latest version)
and it renders properly as I would expect/as I just explained. Is this
not correct? Is Firefox trying to make it work/trying to understand
what I meant and reproducing it as such?

Thank you for your feedback. Regards,
Fer


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

* Re: [wwwdocs] Add Ada's changelog entry
  2022-04-14  4:44             ` Gerald Pfeifer
  2022-04-14  5:04               ` Gerald Pfeifer
@ 2022-04-16 13:04               ` Gerald Pfeifer
  1 sibling, 0 replies; 13+ messages in thread
From: Gerald Pfeifer @ 2022-04-16 13:04 UTC (permalink / raw)
  To: Fernando Oleo Blanco, Arnaud Charlet; +Cc: gcc-patches, Eric Botcazou

On Wed, 13 Apr 2022, Gerald Pfeifer wrote:
> I am not familiar with that Emacs mode, but < and > are special characters 
> in HTML and have to be written as &lt; (less than) and &gt; (greater than) 
> respectively.

Here is a second batch which I had missed originally. 

Also pushed...

Gerald


commit adefeb2b20b4bce5575bd550a48cb476e001987f
Author: Gerald Pfeifer <gerald@pfeifer.com>
Date:   Wed Apr 13 23:09:00 2022 -0600

    gcc-12: More < and > escaping

diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html
index 057d1274..9daf3c51 100644
--- a/htdocs/gcc-12/changes.html
+++ b/htdocs/gcc-12/changes.html
@@ -233,9 +233,9 @@ 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);
+     when (Neg, Neg) | (Pos, Pos) =&gt; Pos,
+     when (Zero, &lt;&gt;) | (&lt;&gt;, Zero) =&gt; Zero,
+     when (Neg, Pos) | (Pos, Neg) =&gt; Neg);
         </pre></code></li>
     </ul>
     </li>

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

* Re: [wwwdocs] Add Ada's changelog entry
  2022-04-15 13:55                 ` Fernando Oleo Blanco
@ 2022-04-16 13:22                   ` Gerald Pfeifer
  0 siblings, 0 replies; 13+ messages in thread
From: Gerald Pfeifer @ 2022-04-16 13:22 UTC (permalink / raw)
  To: Fernando Oleo Blanco; +Cc: Arnaud Charlet, gcc-patches, Eric Botcazou

On Fri, 15 Apr 2022, Fernando Oleo Blanco wrote:
> thank you for your comments. As you have picked up, HTML is not my
> strongest language.
> 
> I did not know that "<" and ">" had to scaped in HTML, I will try to
> remember that.

No worries, Fernando. "<" and ">" require special handling in HTML since
the otherwise mark tags such as <html>, <p>, <code> and the like.

> Regarding the nested <ul>. Since I did not know HTML, I looked at how
> nested structure/lists are generated. Since the changelog uses
> sequences of <li> and <ul> to indent/create a nested list, so I did. I
> wanted to have a "title" (Pattern matching) and then have the
> explanation with the code. Therefore, I copied the <li>, <ul> sequence
> to get another level of nesting.

Ah, I see. I believe I've got it and committed the little adjustment
below.

> I checked my results by opening the file in Firefox (latest version)
> and it renders properly as I would expect/as I just explained. Is this
> not correct? Is Firefox trying to make it work/trying to understand
> what I meant and reproducing it as such?

Yes, browsers are relatively resilient and intelligently render things
that technically may not be perfectly standards compliant - Postel's law
and such. :)

To validate a document, especially after bigger changes, the W3 validator
( https://validator.w3.org ) has proven very helpful. It allows you to 
easily upload a draft version and get immediate feedback.

In any case, having documentation is more in important than detailed
markup aspects, with which I and others can help - thank you for that!

Gerald


commit 771ba5f8386afe082d41f47d504b405784785ac7
Author: Gerald Pfeifer <gerald@pfeifer.com>
Date:   Sat Apr 16 07:12:53 2022 -0600

    gcc-12: Fix two markup issues

diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html
index 9daf3c51..4f904bfd 100644
--- a/htdocs/gcc-12/changes.html
+++ b/htdocs/gcc-12/changes.html
@@ -221,14 +221,14 @@ a work-in-progress.</p>
       <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>
+    <li>Pattern matching
     <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 pattern matching. An example would
-        be <code><pre>
+        be <pre>
 type Sign is (Neg, Zero, Pos);
 
 function Multiply (S1, S2 : Sign) return Sign is
@@ -236,7 +236,7 @@ function Multiply (S1, S2 : Sign) return Sign is
      when (Neg, Neg) | (Pos, Pos) =&gt; Pos,
      when (Zero, &lt;&gt;) | (&lt;&gt;, Zero) =&gt; Zero,
      when (Neg, Pos) | (Pos, Neg) =&gt; Neg);
-        </pre></code></li>
+        </pre></li>
     </ul>
     </li>
   </ul>

^ 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).