Hello Sandra,

On 15/01/2021 20:12, Sandra Loosemore wrote:

The following instructions supported by this component are not enabled
by this option:

* -mcustom-fmins
* -mcustom-fmaxs
* -mcustom-round

The reason is that these instructions are only in effect in combination
with other options. If they are not set, then a build error occurs in
libatomic since -Werror is used for building this library:

cc1: error: switch '-mcustom-fmins' has no effect unless '-ffinite-math-only' is specified [-Werror] cc1: error: switch '-mcustom-fmaxs' has no effect unless '-ffinite-math-only' is specified [-Werror] cc1: error: switch '-mcustom-round' has no effect unless '-fno-math-errno' is specified [-Werror]


Seems like it would be better to have a separate switch to disable these warnings, or perhaps remove them entirely, as I'm sure there are other custom instructions that are not used unless -ffinite-math-only, -fno-math-errno, or -ffast-math are also specified (e.g., I see an issue in our internal tracker about fsqrts) and we don't consistently warn about those.  So I think the warnings are of dubious value.  Maybe the existing -Wdisabled-optimization flag could be used here to control the warnings we're already checking for?

thanks for having a look at it. It would be good to control the warning via an option not enabled by -Wall or remove the warnings. The -Wdisabled-optimization not used in gcc/config/*:

grep -r 'warning (OPT_Wdisabled' gcc/
gcc/tree-ssa-loop-prefetch.c:     warning (OPT_Wdisabled_optimization,
gcc/gcse.c:      warning (OPT_Wdisabled_optimization,
gcc/gcse.c:      warning (OPT_Wdisabled_optimization,

The warning description doesn't really fit from my point of view.

Maybe use -Wextra which is already used by avr (not really a prime target):

grep -r 'warning (OPT_Wextra' gcc/config
gcc/config/avr/avr.c:          warning (OPT_Wextra, "rounding to %d bits has no effect for "

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/

Reply via email to