This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gcc-wwwdocs".

The branch, master has been updated
       via  4979889192aecb6c5693d1a48f2d5ca0d6d6b3a5 (commit)
       via  f6ffc93bec5200fbf5fb16542d55c5b9dd0594c6 (commit)
       via  172ad664634bf0dd7c01c48a6c9dfa92e0cf3427 (commit)
       via  4e3abc55705b3ac26c202523bc482c2691692885 (commit)
      from  3cf8c149005ecd153b1bb0a082920f95edb670b0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4979889192aecb6c5693d1a48f2d5ca0d6d6b3a5
Author: David Malcolm <dmalc...@redhat.com>
Date:   Wed Jan 15 12:26:33 2025 -0500

    gcc-15/porting_to: prefer <stdint.h> to <cstdint.h> for non-std:: types
    
    Signed-off-by: David Malcolm <dmalc...@redhat.com>

diff --git a/htdocs/gcc-15/porting_to.html b/htdocs/gcc-15/porting_to.html
index 7344afa5..39598b93 100644
--- a/htdocs/gcc-15/porting_to.html
+++ b/htdocs/gcc-15/porting_to.html
@@ -82,11 +82,13 @@ As such, C++ programs that used standard library components 
without
 including the right headers will no longer compile.
 </p>
 <p>
-In particular, the following header is used less widely within libstdc++ and
+In particular, the following headers are used less widely within libstdc++ and
 may need to be included explicitly when compiling with GCC 15:
 </p>
 <ul>
-<li> <code>&lt;cstdint&gt;</code>
+<li> <code>&lt;stdint.h&gt;</code>
+  (for <code>int8_t</code>, <code>int32_t</code> etc.)
+  and <code>&lt;cstdint&gt;</code>
   (for <code>std::int8_t</code>, <code>std::int32_t</code> etc.)
 </li>
 </ul>

commit f6ffc93bec5200fbf5fb16542d55c5b9dd0594c6
Author: David Malcolm <dmalc...@redhat.com>
Date:   Wed Jan 15 12:12:43 2025 -0500

    gcc-15/porting_to: add section on new C23 keywords
    
    Signed-off-by: David Malcolm <dmalc...@redhat.com>

diff --git a/htdocs/gcc-15/porting_to.html b/htdocs/gcc-15/porting_to.html
index e6da6cd9..7344afa5 100644
--- a/htdocs/gcc-15/porting_to.html
+++ b/htdocs/gcc-15/porting_to.html
@@ -43,6 +43,36 @@ to your build flags, or port your code to C23.
 
 <!-- C23 brings the following changes: -->
 
+<h4 id="c23-new-keywords">New keywords</h4>
+<p>
+  C23 added various new keywords, including
+  <code>bool</code>, <code>true</code>, <code>false</code>,
+  <code>nullptr</code>, and <code>thread_local</code>.
+  Code that uses these for identifiers will need changing.
+  For example <code>typedef int bool;</code> will
+  <a href="https://godbolt.org/z/7W8fMT9zd";>fail</a> with:
+</p>
+<pre><code>
+&lt;source&gt;:1:13: error: 'bool' cannot be defined via 'typedef'
+    1 | typedef int bool;
+      |             ^~~~
+&lt;source&gt;:1:13: note: 'bool' is a keyword with '-std=c23' onwards
+&lt;source&gt;:1:1: warning: useless type name in empty declaration
+    1 | typedef int bool;
+      | ^~~~~~~
+</code></pre>
+<p>
+  In C99 and later you can use <code>#include &lt;stdbool.h&gt;</code>
+  which provides definitions of <code>bool</code>, <code>true</code>,
+  and <code>false</code> compatible with C23.
+</p>
+<p>
+  Note that the <code>bool</code> type is <b>not</b> the same
+  as <code>int</code> at ABI level, and so care may be needed porting
+  declarations that appear at an ABI boundary (or serialized to the
+  filesystem).
+</p>
+
 <h2 id="cxx">C++ language issues</h2>
 
 <h3 id="header-dep-changes">Header dependency changes</h3>

commit 172ad664634bf0dd7c01c48a6c9dfa92e0cf3427
Author: David Malcolm <dmalc...@redhat.com>
Date:   Wed Jan 15 14:07:56 2025 -0500

    gcc-15/porting_to: C23 by default
    
    Signed-off-by: David Malcolm <dmalc...@redhat.com>

diff --git a/htdocs/gcc-15/porting_to.html b/htdocs/gcc-15/porting_to.html
index 702cf507..e6da6cd9 100644
--- a/htdocs/gcc-15/porting_to.html
+++ b/htdocs/gcc-15/porting_to.html
@@ -27,7 +27,21 @@ and provide solutions. Let us know if you have suggestions 
for improvements!
 <p>Note: GCC 15 has not been released yet, so this document is
 a work-in-progress.</p>
 
-<!-- <h2 id="c">C language issues</h2> -->
+<h2 id="c">C language issues</h2>
+
+<h3 id="c23">C23 by default</h3>
+<!-- change of default was in commit 55e3bd376b2214e200fa76d12b67ff259b06c212 
-->
+
+GCC 15 changes the default language version for C compilation from
+<a 
href="https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=gnu17</a>
+to
+<a 
href="https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=gnu23</a>.
+
+If your code relies on older versions of the C standard, you will need to
+either add <a 
href="https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=</a>
+to your build flags, or port your code to C23.
+
+<!-- C23 brings the following changes: -->
 
 <h2 id="cxx">C++ language issues</h2>
 

commit 4e3abc55705b3ac26c202523bc482c2691692885
Author: David Malcolm <dmalc...@redhat.com>
Date:   Wed Jan 15 14:05:47 2025 -0500

    gcc-15/changes: C23 by default
    
    Signed-off-by: David Malcolm <dmalc...@redhat.com>

diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html
index d5037efb..c87c8a0d 100644
--- a/htdocs/gcc-15/changes.html
+++ b/htdocs/gcc-15/changes.html
@@ -99,6 +99,18 @@ a work-in-progress.</p>
            <code>musttail</code> statement attribute</a> was added to enforce 
tail calls.</li>
 </ul>
 
+<h3 id="c">C</h3>
+<ul>
+  <li>GCC 15 changes the default language version for C compilation from
+    <a 
href="https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=gnu17</a>
+    to
+    <a 
href="https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=gnu23</a>.
+    If your code relies on older versions of the C standard, you will need to
+    either add
+    <a 
href="https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=</a>
+    to your build flags, or port your code; see <a 
href="porting_to.html#c23">the porting notes</a>.
+</ul>
+
 <h3 id="cxx">C++</h3>
 
 <ul>

-----------------------------------------------------------------------

Summary of changes:
 htdocs/gcc-15/changes.html    | 12 ++++++++++
 htdocs/gcc-15/porting_to.html | 52 ++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 61 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
gcc-wwwdocs

Reply via email to