Hi Joel,

On Thu, 29 Oct 2020, Joel Sherrill wrote:

> With gcc 10, Coverity reports this:
>
>   Command-line error #1359: invalid GNU version number: 201
>
>   [ERROR] 1 catastrophic error detected in this compilation.
>   Compilation terminated.
>   WARNING: cov-emit returned with code 2

I noticed this, too, and unfortunately it does not seem that there is a
whole lot of interest or at least rush on Synopsys' side to fix this. This
post has been unanswered since May 2020:

https://community.synopsys.com/s/question/0D52H000058Z6KvSAK/gcc101-when-it-will-be-supported

In the meantime, I noticed that I can edit the `.xml` files in the `emit/`
subdirectory of the path I specified via `--dir`. In your case, they should
contain a line like this:

          <version>0.2.1</version>

If you change that to this form, Coverity should start to work again:

          <version>10.2.1</version>

I actually use a slightly more automated version of this
(https://github.com/git-for-windows/build-extra/commit/23eea104d5358):

        gcc10_workaround="$(gcc -v 2>&1 |
                sed -n 's/^gcc version 
\([1-9]\)\([0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/s|\\<\\(\1\\)\\?\\(\2\\.\3\\.\4\\)\\>|\1\\2|g/p')"
        find cov-int/emit/* -name \*.xml -exec sed -i "$gcc10_workaround" {} \;

Ciao,
Johannes

Reply via email to