https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85425
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |NEW Last reconfirmed| |2018-04-16 Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Gerhard Heinzel from comment #2) > (In reply to Jonathan Wakely from comment #1) > > Many thanks for your quick response. > I normally don't use -Wconversion because it floods me with > uninteresting errors about size_t, floor(), and code from bison/flex etc. Yes, it's true that it produces a lot of warnings (which is why it isn't enabled by -Wall). It might be possible to add a new warning for cases where the arguments are "obviously" transposed. For example, in my reduced version: void ghhrobust_search (double ay, int type) { } void f(int i, double d) { ghhrobust_search(i, d); } Although both conversions are allowed by the language, the fact that swapping the arguments would require no conversions could be used to detect cases that might be accidental. Confirming as an enhancement request for a new warning.