https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63357

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #8 from David Binderman <dcb314 at hotmail dot com> ---
This could probably be extended to other operators.

Static analyser cppcheck can be made to say things like:

linux-6.2/drivers/spi/spi-sn-f-ospi.c:614:31: style: Same expression
'SPI_TX_OCTAL' found multiple times in chain of '|' operators.
[duplicateExpression]

Source code is

    ctlr->mode_bits = SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL
        | SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_OCTAL
        | SPI_MODE_0 | SPI_MODE_1 | SPI_LSB_FIRST;

If |, then probably also &.

Reply via email to