when compiling the 2.2.0 version of the library for ARM with gcc 8.3, the build fails with the following:
smtp-address-validator.cpp:212:23: error: narrowing conversion of ‘-32’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
smtp-address-validator.cpp:212:23: error: narrowing conversion of ‘-19’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
smtp-address-validator.cpp:212:23: error: narrowing conversion of ‘-15’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
smtp-address-validator.cpp:212:23: error: narrowing conversion of ‘-13’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
smtp-address-validator.cpp:212:23: error: narrowing conversion of ‘-128’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
smtp-address-validator.cpp:212:23: error: narrowing conversion of ‘-65’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
smtp-address-validator.cpp:212:23: error: narrowing conversion of ‘-32’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
...
Apparently, this comes from the fact that the signedness of char is implementation-defined (https://stackoverflow.com/a/31635036). I've managed to work around this with -Wno-narrowing option, but no idea if it has implications on the email validator (and don't care since I'm not using one anyway).
I've tried to fix this by specifying signed char on _address_trans_keys but then it clashes with some obscure arithmetics later, so I gave it up, and the file seems to be generated by ragel anyway.
Hi,
when compiling the 2.2.0 version of the library for ARM with gcc 8.3, the build fails with the following:
Apparently, this comes from the fact that the signedness of char is implementation-defined (https://stackoverflow.com/a/31635036). I've managed to work around this with
-Wno-narrowing
option, but no idea if it has implications on the email validator (and don't care since I'm not using one anyway).I've tried to fix this by specifying
signed char
on_address_trans_keys
but then it clashes with some obscure arithmetics later, so I gave it up, and the file seems to be generated byragel
anyway.Cheers