[Bug c/70378] wrong warning with -Wconversion with explicit cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70378 Eric Gallager changed: What|Removed |Added CC||dmalcolm at gcc dot gnu.org, ||dodji at gcc dot gnu.org --- Comment #5 from Eric Gallager --- cc-ing diagnostics maintainers
[Bug c/70378] wrong warning with -Wconversion with explicit cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70378 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=70336 --- Comment #4 from Eric Gallager --- (In reply to Manuel López-Ibáñez from comment #3) > (In reply to Manuel López-Ibáñez from comment #2) > > Simpler testcase: > > > > typedef unsigned int uint32_t; > > void foo(char a, uint32_t b) > > { > > b = (uint32_t)((b * 10) + (uint32_t)a); > > } > > > > Something must be removing the explicit cast or messing up the expression. > > Perhaps a duplicate of PR70336. It seems that the move to match.pd just > added more early folding that removes explicit casts. 70336 was fixed, though, and I still get a warning for this testcase...
[Bug c/70378] wrong warning with -Wconversion with explicit cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70378 --- Comment #3 from Manuel López-Ibáñez --- (In reply to Manuel López-Ibáñez from comment #2) > Simpler testcase: > > typedef unsigned int uint32_t; > void foo(char a, uint32_t b) > { > b = (uint32_t)((b * 10) + (uint32_t)a); > } > > Something must be removing the explicit cast or messing up the expression. Perhaps a duplicate of PR70336. It seems that the move to match.pd just added more early folding that removes explicit casts.
[Bug c/70378] wrong warning with -Wconversion with explicit cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70378 Manuel López-Ibáñez changed: What|Removed |Added Target|x86_64-w64-mingw32 | Status|UNCONFIRMED |NEW Version|unknown |6.0 Keywords||diagnostic Last reconfirmed||2016-04-02 CC||manu at gcc dot gnu.org Host|x86_64-w64-mingw32 | Ever confirmed|0 |1 Summary|[5.3] inconsistant warnings |wrong warning with |with -Wconversion for |-Wconversion with explicit |different types |cast Known to fail||6.0 Build|x86_64-w64-mingw32 | --- Comment #2 from Manuel López-Ibáñez --- Simpler testcase: typedef unsigned int uint32_t; void foo(char a, uint32_t b) { b = (uint32_t)((b * 10) + (uint32_t)a); } Something must be removing the explicit cast or messing up the expression.