gcc-wwwdocs branch master updated. a33ad5c5681a0ce2dfba0a90b4043f399b7a7d55

2024-04-04 Thread David Malcolm via Gcc-cvs-wwwdocs
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  a33ad5c5681a0ce2dfba0a90b4043f399b7a7d55 (commit)
   via  00e45d6100ab1e8bb1c6f8e3a90ac6ba1281336d (commit)
   via  fb40537f9b2779f853277ee3299a41b9cb792edb (commit)
   via  fa7ec7fcb46b79640581aa6382d15ef7bb213c28 (commit)
   via  e94f99b63102cd8df716c4d0e1d820f9d1483562 (commit)
   via  19d501ff0cf4b28dc7b93c5492912790c34bbc6d (commit)
   via  d21d1e5bb3864171edbcdfbc3cc5a154cda8de0c (commit)
   via  899346397e3bf93d282156969c72faa85cce29f1 (commit)
   via  0365f758c3c7be1991524b103594c57db1ca (commit)
  from  5355f9e63f8240f6a3753a6f9ae10133d0c34e38 (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 a33ad5c5681a0ce2dfba0a90b4043f399b7a7d55
Author: David Malcolm 
Date:   Thu Apr 4 12:37:01 2024 -0400

gcc-14: add 'Improvements to SARIF support' section

Signed-off-by: David Malcolm 

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index d782c334..934cd1ad 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -922,6 +922,28 @@ it emits:
   
 
 
+
+Improvements to SARIF support
+
+  
+
+The SARIF output from
+https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format";>-fdiagnostics-format=
+now adds indentation and newlines to reflect the logical JSON structure of 
the data.  The previous compact behavior can be restored via the new option
+https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fno-diagnostics-json-formatting";>-fno-diagnostics-json-formatting.
+This also applies to the older output format named "json".
+  
+  
+
+If profiling information about the compiler itself is requested via
+https://gcc.gnu.org/onlinedocs/gcc/Developer-Options.html#index-ftime-report";>-ftime-report,
+and a SARIF output format is requested via
+https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format";>-fdiagnostics-format=,
+then the timing and memory usage data is now written in JSON form into
+the SARIF output, rather than as plain text to stderr.
+  
+
+
 
 Improvements for plugin authors
 

commit 00e45d6100ab1e8bb1c6f8e3a90ac6ba1281336d
Author: David Malcolm 
Date:   Thu Apr 4 12:37:01 2024 -0400

gcc-14: analyzer improvements

Signed-off-by: David Malcolm 

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 8b72bc20..d782c334 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -760,6 +760,168 @@ __asm (".global __flmap_lock"  "\n\t"
   
 
 
+
+Improvements to Static Analyzer
+
+  
+New warnings:
+
+  
+   
+   https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-infinite-loop";>-Wanalyzer-infinite-loop
+   warns about paths through the code which appear to lead to an infinite 
loop.
+  
+  
+   
+   https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-overlapping-buffers";>-Wanalyzer-overlapping-buffers
 warns for paths through the code in which overlapping buffers are passed to an 
API for which the behavior on such buffers is undefined.
+  
+  
+   
+   https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-undefined-behavior-strtok";>-Wanalyzer-undefined-behavior-strtok
+   warns for paths through the code in which a call is made to
+   strtok with undefined behavior.
+  
+
+  
+  
+
+Previously, the analyzer's "taint" tracking to be explicitly enabled via
+https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-fanalyzer-checker";>-fanalyzer-checker=taint
+(along with
+https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-fanalyzer";>-fanalyzer).
+This is now enabled by default when
+https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-fanalyzer";>-fanalyzer
+is selected, thus also enabling the 6 taint-based warnings:
+
+  
+   https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-allocation-size";>-Wanalyzer-tainted-allocation-size
+  
+  
+   https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-array-index";>-Wanalyzer-tainted-array-index
+  
+  
+   https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html#index-Wanalyzer-tainted-assertion";>-Wanalyzer-tainted-assertion
+  
+  
+   https://gcc.gnu.org/onlinedocs/gcc/Static-Ana

gcc-wwwdocs branch master updated. ab5a071cd63d5eca2030cca01758337044644f45

2024-12-03 Thread David Malcolm via Gcc-cvs-wwwdocs
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  ab5a071cd63d5eca2030cca01758337044644f45 (commit)
  from  85eade7170dd66271b684e4b785ea958d036b1f9 (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 ab5a071cd63d5eca2030cca01758337044644f45
Author: David Malcolm 
Date:   Tue Dec 3 16:16:46 2024 -0500

onlinedocs: add link to libgdiagnostics documentation

diff --git a/htdocs/onlinedocs/index.html b/htdocs/onlinedocs/index.html
index d3fa24c6..07e3de17 100644
--- a/htdocs/onlinedocs/index.html
+++ b/htdocs/onlinedocs/index.html
@@ -1855,6 +1855,7 @@ existing release.
href="https://gcc.gnu.org/onlinedocs/libquadmath-html.tar.gz";>an
HTML tarball)
 https://gcc.gnu.org/onlinedocs/jit/";>libgccjit 
documentation
+https://gcc.gnu.org/onlinedocs/libgdiagnostics/";>libgdiagnostics 
documentation
 https://gcc.gnu.org/onlinedocs/docs-sources.tar.gz";>Texinfo
sources of all the manuals
   

---

Summary of changes:
 htdocs/onlinedocs/index.html | 1 +
 1 file changed, 1 insertion(+)


hooks/post-receive
-- 
gcc-wwwdocs


gcc-wwwdocs branch master updated. 801f3ad85b22a5da5114bfb47d74c94033806f24

2025-01-15 Thread David Malcolm via Gcc-cvs-wwwdocs
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  801f3ad85b22a5da5114bfb47d74c94033806f24 (commit)
   via  4b61405659dbbfd9312e90e5bf6bfc224eabe3a4 (commit)
  from  6b798c7ed7aa889dd2c0f7f252b4d099b3cfbc22 (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 801f3ad85b22a5da5114bfb47d74c94033806f24
Author: David Malcolm 
Date:   Wed Jan 15 14:08:24 2025 -0500

gcc-15/porting_to: c23-fn-decls-without-parameters

diff --git a/htdocs/gcc-15/porting_to.html b/htdocs/gcc-15/porting_to.html
index 39598b93..c446e309 100644
--- a/htdocs/gcc-15/porting_to.html
+++ b/htdocs/gcc-15/porting_to.html
@@ -41,7 +41,69 @@ If your code relies on older versions of the C standard, you 
will need to
 either add https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=
 to your build flags, or port your code to C23.
 
-
+C23 brings the following changes:
+
+Function declarations without 
parameters
+
+  The meaning of function declarations of the form
+  rettype identifier ();
+  such as
+  char *strstr ();
+  changed in C23.
+
+
+  In C17 and earlier, such function declarators specified no information
+  about the number or types of the parameters of the function (C17 6.7.6.3),
+  requiring users to know the correct number of arguments, with each passed
+  argument going through default argument promotion.
+
+
+  In C23 such declarations mean (void) i.e. a function taking
+  no arguments, which can lead to build failures on code that relied on
+  the earlier meaning, such as in
+  https://godbolt.org/z/11hzWYEeK";>this example:
+
+
+#include 
+
+void test()
+{
+  void (*handler)();
+  handler = signal(SIGQUIT, SIG_IGN);
+}
+
+: In function 'test':
+:6:11: error: assignment to 'void (*)(void)' from incompatible 
pointer type '__sighandler_t' {aka 'void (*)(int)'} 
[-Wincompatible-pointer-types]
+6 |   handler = signal(SIGQUIT, SIG_IGN);
+  |   ^
+In file included from :1:
+/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
+   72 | typedef void (*__sighandler_t) (int);
+  |^~
+
+
+  Code such as the above relying on a non-zero number of parameters (such
+  as a single int) can be fixed for C23 by adding the correct
+  parameters to the function declarator, such as via:
+
+
+  void (*handler)(int);
+
+
+  In other cases the code is simply missing a #include of
+  the correct header, such as with:
+
+  void *malloc();
+
+
+  These can be fixed by including the correct header and removing the
+  non-prototype declaration.
+
+
+  Alternatively you can use
+  https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=
+  to select an earlier version of the C standard.
+
 
 New keywords
 

commit 4b61405659dbbfd9312e90e5bf6bfc224eabe3a4
Author: David Malcolm 
Date:   Wed Jan 15 14:53:57 2025 -0500

gcc-15/changes: add "C23 by default:" to 

Tweak to help readability by adding a prefix to the 

diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html
index 98d85cf9..171c3db4 100644
--- a/htdocs/gcc-15/changes.html
+++ b/htdocs/gcc-15/changes.html
@@ -101,7 +101,8 @@ a work-in-progress.
 
 C
 
-  GCC 15 changes the default language version for C compilation from
+  C23 by default: GCC 15 changes the default language version
+for C compilation from
 https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=gnu17
 to
 https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=gnu23.

---

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


hooks/post-receive
-- 
gcc-wwwdocs


gcc-wwwdocs branch master updated. 4979889192aecb6c5693d1a48f2d5ca0d6d6b3a5

2025-01-15 Thread David Malcolm via Gcc-cvs-wwwdocs
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 
Date:   Wed Jan 15 12:26:33 2025 -0500

gcc-15/porting_to: prefer  to  for non-std:: types

Signed-off-by: David Malcolm 

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.
 
 
-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:
 
 
- 
+ 
+  (for int8_t, int32_t etc.)
+  and 
   (for std::int8_t, std::int32_t etc.)
 
 

commit f6ffc93bec5200fbf5fb16542d55c5b9dd0594c6
Author: David Malcolm 
Date:   Wed Jan 15 12:12:43 2025 -0500

gcc-15/porting_to: add section on new C23 keywords

Signed-off-by: David Malcolm 

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.
 
 
 
+New keywords
+
+  C23 added various new keywords, including
+  bool, true, false,
+  nullptr, and thread_local.
+  Code that uses these for identifiers will need changing.
+  For example typedef int bool; will
+  https://godbolt.org/z/7W8fMT9zd";>fail with:
+
+
+:1:13: error: 'bool' cannot be defined via 'typedef'
+1 | typedef int bool;
+  | ^~~~
+:1:13: note: 'bool' is a keyword with '-std=c23' onwards
+:1:1: warning: useless type name in empty declaration
+1 | typedef int bool;
+  | ^~~
+
+
+  In C99 and later you can use #include 
+  which provides definitions of bool, true,
+  and false compatible with C23.
+
+
+  Note that the bool type is not the same
+  as int at ABI level, and so care may be needed porting
+  declarations that appear at an ABI boundary (or serialized to the
+  filesystem).
+
+
 C++ language issues
 
 Header dependency changes

commit 172ad664634bf0dd7c01c48a6c9dfa92e0cf3427
Author: David Malcolm 
Date:   Wed Jan 15 14:07:56 2025 -0500

gcc-15/porting_to: C23 by default

Signed-off-by: David Malcolm 

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!
 Note: GCC 15 has not been released yet, so this document is
 a work-in-progress.
 
-
+C language issues
+
+C23 by default
+
+
+GCC 15 changes the default language version for C compilation from
+https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=gnu17
+to
+https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=gnu23.
+
+If your code relies on older versions of the C standard, you will need to
+either add https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=
+to your build flags, or port your code to C23.
+
+
 
 C++ language issues
 

commit 4e3abc55705b3ac26c202523bc482c2691692885
Author: David Malcolm 
Date:   Wed Jan 15 14:05:47 2025 -0500

gcc-15/changes: C23 by default

Signed-off-by: David Malcolm 

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.
musttail statement attribute was added to enforce 
tail calls.
 
 
+C
+
+  GCC 15 changes the default language version for C compilation from
+https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=gnu17
+to
+https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=gnu23.
+If your code relies on older versions of the C standard, you will need to
+either add
+https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1";>-std=
+

gcc-wwwdocs branch master updated. a886d546cbb54d071fe1bb83878bc7584de50800

2025-04-25 Thread David Malcolm via Gcc-cvs-wwwdocs
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  a886d546cbb54d071fe1bb83878bc7584de50800 (commit)
  from  522b52c2432ad0dc7cbbb05b4f90ba744d19261f (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 a886d546cbb54d071fe1bb83878bc7584de50800
Author: David Malcolm 
Date:   Mon Mar 31 14:27:42 2025 -0400

My GCC 15 changes

diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html
index 3e3c6655..1b7d0e1b 100644
--- a/htdocs/gcc-15/changes.html
+++ b/htdocs/gcc-15/changes.html
@@ -38,6 +38,15 @@ You may also want to check out our
 padding bits is desirable, use {} (valid in C23 or C++)
 or use -fzero-init-padding-bits=unions option to restore
 old GCC behavior.
+  https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html";>-fanalyzer
+is still only suitable for analyzing C code.
+In particular, using it on C++ is unlikely to give meaningful output.
+  
+  The json format for
+https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format";>-fdiagnostics-format=
+is deprecated and may be removed in a future release.
+Users seeking machine-readable diagnostics from GCC should use
+https://gcc.gnu.org/wiki/SARIF";>SARIF.
 
 
 
@@ -79,6 +88,20 @@ You may also want to check out our
 significantly improved. The compiler can now track columnn numbers larger
 than 4096. Very large source files have more accurate location reporting.
   
+  GCC can now emit diagnostics in multiple formats simultaneously,
+via the new option
+https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-add-output";>-fdiagnostics-add-output=.
+For example, use
+https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-add-output";>-fdiagnostics-add-output=sarif
+to get both GCC's classic text output on stderr and
+https://gcc.gnu.org/wiki/SARIF";>SARIF output to a file.
+There is also a new option
+ https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-set-output";>-fdiagnostics-set-output=
+which exposes more control than existing options for some experimental 
cases.
+These new options are an alternative to the existing
+https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-format";>-fdiagnostics-format=
+which only supports a single output format at a time.
+  
 
 
 
@@ -301,7 +324,7 @@ procedure Initialize (Obj : in out T);
   New constraints have been added for defining symbols or using symbols
   inside of inline assembler, and a new generic operand modifier has
   been added to allow printing those regardless of PIC.  For example:
-
+
 struct S { int a, b, c; };
 extern foo (void);
 extern char var;
@@ -313,7 +336,7 @@ asm (".text; %cc0: mov %cc2, %%r0; .previous;"
  "-s" (var2), /* Tell compiler asm uses var2 variable.  */
   /* "s" would work too but might not work with -fpic.  */
  "i" (sizeof (struct S))); /* It is possible to pass constants to toplevel 
asm.  */
-
+
 
 The "redzone" clobber is now allowed in inline
 assembler statements to describe that the assembler can overwrite
@@ -333,6 +356,42 @@ asm (".text; %cc0: mov %cc2, %%r0; .previous;"
 -Wheader-guard warning has been added and enabled
 in -Wall to warn about some inconsistencies in header
 file guarding macros.
+The C and C++ frontends now provide fix-it hints for some cases of 
missing
+'&' and '*'.
+For example, note the ampersand fix-it hint in the following:
+
+demo.c: In function 'int main()':
+demo.c:5:22: error: invalid conversion from 'pthread_key_t' {aka 'unsigned 
int'}
+   to 'pthread_key_t*' {aka 'unsigned int*'} [-fpermissive]
+5 |   pthread_key_create(key, NULL);
+  |  ^~~
+  |  |
+  |  pthread_key_t {aka unsigned int}
+demo.c:5:22: note: possible fix: take the address with '&'
+5 |   pthread_key_create(key, NULL);
+  |  ^~~
+  |  &
+In file included from demo.c:1:
+/usr/include/pthread.h:1122:47: note:   initializing argument 1 of
+   'int pthread_key_create(pthread_key_t*, void (*)(void*))'
+ 1122 | extern int pthread_key_create (pthread_key_t *__key,
+  |~~~^
+
+
+Diagnostic messages referring to attributes now provide URLs
+