gcc compiler options according to visual studio warning level /W3

markus.forrer@gmx.ch markus.forrer@gmx.ch
Mon Mar 29 16:01:33 GMT 2021


Hi Jonathan

Thank you for your answer.

I am currently using the flags '-Wall -Werror'. I am missing a warning ('=': conversion from 'uint16_t' to 'uint8_t', possible loss of data) for the following code:

uint16_t value1 = 123;
uint8_t value2 = value1;

When I use the flag '-Wconversion', I get too many warnings.

One possibility is to try through the flags until I get the same warnings in Visual Studio and gcc. But that is a lot of work. So here is the question if there is a list which gcc warnings correspond to which Visual Studio warnings.


More information about the Gcc-help mailing list