void f(short& a, short b, short c) {
a = b + c;
}
<source>:2:9: warning: narrowing conversion from 'int' to signed type 'short' is implementation-defined [bugprone-narrowing-conversions]
2 | a = b + c;
|
https://godbolt.org/z/913zov7vz
Maybe there could be an option to suppress the warning in case all types involved are the same? I don't see how adding a cast would improve the example.