[wwwdocs] gcc-14: Mention that some warnings are now errors

Message ID 20240413095037.61941-1-sebastian.huber@embedded-brains.de
State New
Headers
Series [wwwdocs] gcc-14: Mention that some warnings are now errors |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply

Commit Message

Sebastian Huber April 13, 2024, 9:50 a.m. UTC
  ---
 htdocs/gcc-14/changes.html | 11 +++++++++++
 1 file changed, 11 insertions(+)
  

Comments

Eric Gallager April 13, 2024, 5:44 p.m. UTC | #1
On Sat, Apr 13, 2024 at 5:51 AM Sebastian Huber
<sebastian.huber@embedded-brains.de> wrote:
>
> ---
>  htdocs/gcc-14/changes.html | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
> index 8ac08e9a..a183fad8 100644
> --- a/htdocs/gcc-14/changes.html
> +++ b/htdocs/gcc-14/changes.html
> @@ -231,6 +231,17 @@ a work-in-progress.</p>
>    previous options <code>-std=c2x</code>, <code>-std=gnu2x</code>
>    and <code>-Wc11-c2x-compat</code>, which are deprecated but remain
>    supported.</li>
> +  <li>The following warnings are now errors (see also
> +    <a href="porting_to.html">Porting to GCC 14</a>):
> +    <ul>
> +      <li><code>-Werror=declaration-missing-parameter-type</code></li>
> +      <li><code>-Werror=implicit-function-declaration</code></li>
> +      <li><code>-Werror=implicit-int</code></li>
> +      <li><code>-Werror=incompatible-pointer-types</code></li>
> +      <li><code>-Werror=int-conversion</code></li>
> +      <li><code>-Werror=return-mismatch</code></li>
> +    </ul>
> +  </li>
>  </ul>
>

I'd suggest adding the words "by default" to emphasize that they can
be turned back into warnings, and/or disabled. Perhaps others will
have other wording suggestions.

>  <h3 id="cxx">C++</h3>
> --
> 2.35.3
>
  
Sam James April 13, 2024, 5:53 p.m. UTC | #2
Eric Gallager <egall@gwmail.gwu.edu> writes:

> On Sat, Apr 13, 2024 at 5:51 AM Sebastian Huber
> <sebastian.huber@embedded-brains.de> wrote:
>>
>> ---
>>  htdocs/gcc-14/changes.html | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
>> index 8ac08e9a..a183fad8 100644
>> --- a/htdocs/gcc-14/changes.html
>> +++ b/htdocs/gcc-14/changes.html
>> @@ -231,6 +231,17 @@ a work-in-progress.</p>
>>    previous options <code>-std=c2x</code>, <code>-std=gnu2x</code>
>>    and <code>-Wc11-c2x-compat</code>, which are deprecated but remain
>>    supported.</li>
>> +  <li>The following warnings are now errors (see also
>> +    <a href="porting_to.html">Porting to GCC 14</a>):
>> +    <ul>
>> +      <li><code>-Werror=declaration-missing-parameter-type</code></li>
>> +      <li><code>-Werror=implicit-function-declaration</code></li>
>> +      <li><code>-Werror=implicit-int</code></li>
>> +      <li><code>-Werror=incompatible-pointer-types</code></li>
>> +      <li><code>-Werror=int-conversion</code></li>
>> +      <li><code>-Werror=return-mismatch</code></li>
>> +    </ul>
>> +  </li>
>>  </ul>
>>
>
> I'd suggest adding the words "by default" to emphasize that they can
> be turned back into warnings, and/or disabled. Perhaps others will
> have other wording suggestions.

Works for me with that added, although I can't formally approve.

It's fine without it though too.

>
>>  <h3 id="cxx">C++</h3>
>> --
>> 2.35.3
>>
  
Gerald Pfeifer April 14, 2024, 3:55 p.m. UTC | #3
Hi Sebastian,

On Sat, 13 Apr 2024, Sebastian Huber wrote:
> +  <li>The following warnings are now errors (see also
> +    <a href="porting_to.html">Porting to GCC 14</a>):
> +    <ul>
> +      <li><code>-Werror=declaration-missing-parameter-type</code></li>
> +      <li><code>-Werror=implicit-function-declaration</code></li>
> +      <li><code>-Werror=implicit-int</code></li>
> +      <li><code>-Werror=incompatible-pointer-types</code></li>
> +      <li><code>-Werror=int-conversion</code></li>
> +      <li><code>-Werror=return-mismatch</code></li>
> +    </ul>

thanks for putting this together. Just a question, and maybe I'm confused:
these don't look like warnings to me?

Are you saying that what used to be -Wint-conversion is now an error by 
default and does not need to activated as such with any further options?

(That is, it appears as if those -Werror=... flags were used?)

And does this apply to all C versions/dialects?

Gerald
  
Jakub Jelinek April 14, 2024, 4:02 p.m. UTC | #4
On Sun, Apr 14, 2024 at 05:55:03PM +0200, Gerald Pfeifer wrote:
> Hi Sebastian,
> 
> On Sat, 13 Apr 2024, Sebastian Huber wrote:
> > +  <li>The following warnings are now errors (see also
> > +    <a href="porting_to.html">Porting to GCC 14</a>):
> > +    <ul>
> > +      <li><code>-Werror=declaration-missing-parameter-type</code></li>
> > +      <li><code>-Werror=implicit-function-declaration</code></li>
> > +      <li><code>-Werror=implicit-int</code></li>
> > +      <li><code>-Werror=incompatible-pointer-types</code></li>
> > +      <li><code>-Werror=int-conversion</code></li>
> > +      <li><code>-Werror=return-mismatch</code></li>
> > +    </ul>
> 
> thanks for putting this together. Just a question, and maybe I'm confused:
> these don't look like warnings to me?
> 
> Are you saying that what used to be -Wint-conversion is now an error by 
> default and does not need to activated as such with any further options?
> 
> (That is, it appears as if those -Werror=... flags were used?)
> 
> And does this apply to all C versions/dialects?

No, so I think the change is certainly not appropriate in that form.
The porting_to.html, in particular porting_to.html#warnings-as-errors
has detailed explanation on what actually changed etc., so I think we just
want one short sentence that certain C warnings are now errors and refer
to particular porting_to.html#warnings-as-errors for details.
Because the above shortcut is certainly not true.

	Jakub
  

Patch

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 8ac08e9a..a183fad8 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -231,6 +231,17 @@  a work-in-progress.</p>
   previous options <code>-std=c2x</code>, <code>-std=gnu2x</code>
   and <code>-Wc11-c2x-compat</code>, which are deprecated but remain
   supported.</li>
+  <li>The following warnings are now errors (see also
+    <a href="porting_to.html">Porting to GCC 14</a>):
+    <ul>
+      <li><code>-Werror=declaration-missing-parameter-type</code></li>
+      <li><code>-Werror=implicit-function-declaration</code></li>
+      <li><code>-Werror=implicit-int</code></li>
+      <li><code>-Werror=incompatible-pointer-types</code></li>
+      <li><code>-Werror=int-conversion</code></li>
+      <li><code>-Werror=return-mismatch</code></li>
+    </ul>
+  </li>
 </ul>
 
 <h3 id="cxx">C++</h3>