This commit broke bootstrapping - well, at least kind of:
  make pdf   (and probably 'make dvi' and other formats using TeX)
now fails with:
Runaway argument?

-Wanalyzer-tainted-allocation-size @gol -Wanalyzer-tainted-array-inde@ETC.
src/gcc-mainline/gcc/doc/invoke.texi:96
82: File ended while scanning use of @doignoretext.
The problem seems to be that when producing TeX output, the '...' of
  @gccoptlist{ ... }
ends up in a single line. Thus, '@ignore' is found but no
corresponding '<newline>@end ignore'.

Using '@c' has the same problem. And adding a line break will give
an error as  @gccoptlist  does not permit another paragraph in
the argument.

My solution is move the '@ignore' comment after the closing '}'.

Committed attached patch as obvious
as r12-7810-g748f36a48b506f52e10bcdeb750a7fe9c30c26f3

The culprit is the following change:

On 25.03.22 02:08, David Malcolm via Gcc-patches wrote:
From: Avinash Sonawane <root...@gmail.com>

On Thu, 2022-03-24 at 10:41 +0530, Avinash Sonawane wrote:
[...]
[...]

I've gone ahead and pushed it to trunk as r12-7808-g319ba7e241e7e2:
   
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=319ba7e241e7e21f9eb481f075310796f13d2035
(the patch I committed follows)
[...]

gcc/ChangeLog:
      PR analyzer/103533
      * doc/invoke.texi: Document that enabling taint analyzer
      checker disables some warnings from `-fanalyzer`.
[...]

--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
[...]
@@ -9659,22 +9659,24 @@ Enabling this option effectively enables the following 
warnings:
  -Wanalyzer-free-of-non-heap @gol
  -Wanalyzer-malloc-leak @gol
  -Wanalyzer-mismatching-deallocation @gol
--Wanalyzer-possible-null-argument @gol
--Wanalyzer-possible-null-dereference @gol
  -Wanalyzer-null-argument @gol
  -Wanalyzer-null-dereference @gol
+-Wanalyzer-possible-null-argument @gol
+-Wanalyzer-possible-null-dereference @gol
  -Wanalyzer-shift-count-negative @gol
  -Wanalyzer-shift-count-overflow @gol
  -Wanalyzer-stale-setjmp-buffer @gol
+@ignore
  -Wanalyzer-tainted-allocation-size @gol
  -Wanalyzer-tainted-array-index @gol
  -Wanalyzer-tainted-divisor @gol
  -Wanalyzer-tainted-offset @gol
  -Wanalyzer-tainted-size @gol
+@end ignore
  -Wanalyzer-unsafe-call-within-signal-handler @gol
  -Wanalyzer-use-after-free @gol
--Wanalyzer-use-of-uninitialized-value @gol
  -Wanalyzer-use-of-pointer-in-stale-stack-frame @gol
+-Wanalyzer-use-of-uninitialized-value @gol
  -Wanalyzer-write-to-const @gol
  -Wanalyzer-write-to-string-literal @gol
  }
[...]

Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas 
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht 
München, HRB 106955
commit 748f36a48b506f52e10bcdeb750a7fe9c30c26f3
Author: Tobias Burnus <tob...@codesourcery.com>
Date:   Fri Mar 25 10:47:49 2022 +0100

    doc/invoke.texi: Move @ignore block out of @gccoptlist [PR103533]
    
    With TeX output ("make pdf"), @gccoptlist's content end up in a single
    line such that TeX does not find the matching '@end ignore' for the
    '@ignore' block – failing with a runaway error. Solution is to move
    the @ignore block after the closing '}'.
    (Follow up to r12-7808-g319ba7e241e7e21f9eb481f075310796f13d2035 )
    
    gcc/
            PR analyzer/103533
            * doc/invoke.texi (Static Analyzer Options): Move
            @ignore block after @gccoptlist's '}' for 'make pdf'.

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index afb21d9154c..28307105541 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -9667,13 +9667,6 @@ Enabling this option effectively enables the following warnings:
 -Wanalyzer-shift-count-negative @gol
 -Wanalyzer-shift-count-overflow @gol
 -Wanalyzer-stale-setjmp-buffer @gol
-@ignore
--Wanalyzer-tainted-allocation-size @gol
--Wanalyzer-tainted-array-index @gol
--Wanalyzer-tainted-divisor @gol
--Wanalyzer-tainted-offset @gol
--Wanalyzer-tainted-size @gol
-@end ignore
 -Wanalyzer-unsafe-call-within-signal-handler @gol
 -Wanalyzer-use-after-free @gol
 -Wanalyzer-use-of-pointer-in-stale-stack-frame @gol
@@ -9681,6 +9674,13 @@ Enabling this option effectively enables the following warnings:
 -Wanalyzer-write-to-const @gol
 -Wanalyzer-write-to-string-literal @gol
 }
+@ignore
+-Wanalyzer-tainted-allocation-size @gol
+-Wanalyzer-tainted-array-index @gol
+-Wanalyzer-tainted-divisor @gol
+-Wanalyzer-tainted-offset @gol
+-Wanalyzer-tainted-size @gol
+@end ignore
 
 This option is only available if GCC was configured with analyzer
 support enabled.

Reply via email to