[Asterisk-code-review] main/say: Work around gcc 9 format-truncation false positive (asterisk[13])

Walter Doekes asteriskteam at digium.com
Wed Oct 28 08:11:17 CDT 2020


Walter Doekes has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/14501 )

Change subject: main/say: Work around gcc 9 format-truncation false positive
......................................................................


Patch Set 1:

> Do you face the issue with -Og as well or not?

Nope.

```
$ for march in -mtune=generic -mtune=native; do for opt in -O0 -Og -O1 -O2 -O3; do echo -n "$march $opt: "; gcc -o say.o -c say.c -I../include -DAST_MODULE=\"core\" -DAST_IN_CORE $opt $march -Werror 2>/dev/null && echo OK || echo FAIL; done; done

-mtune=generic -O0: OK
-mtune=generic -Og: OK
-mtune=generic -O1: OK
-mtune=generic -O2: OK
-mtune=generic -O3: OK
-mtune=native -O0: OK
-mtune=native -Og: OK
-mtune=native -O1: FAIL
-mtune=native -O2: FAIL
-mtune=native -O3: FAIL

```

CPU detection:
```
$ gcc -mtune=generic -Q --help=target | sed -e '/^\(  -mtune=\|  -march=\)/!d'
  -march=                     		x86-64
  -mtune=                     		generic

$ gcc -mtune=native -Q --help=target | sed -e '/^\(  -mtune=\|  -march=\)/!d'
  -march=                     		x86-64
  -mtune=                     		nocona

$ gcc -march=native -Q --help=target | sed -e '/^\(  -mtune=\|  -march=\)/!d'
  -march=                     		nocona
  -mtune=                     		nocona
```


-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14501
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Ic7a70120188c9aa525a6d70289385bfce878438a
Gerrit-Change-Number: 14501
Gerrit-PatchSet: 1
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-CC: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Comment-Date: Wed, 28 Oct 2020 13:11:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201028/32fd9de6/attachment.html>


More information about the asterisk-code-review mailing list