[Bug c++/96570] Warnings desired for time_t to int coversions

2020-08-12 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96570 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug c++/96570] Warnings desired for time_t to int coversions

2020-08-12 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96570 --- Comment #5 from Jonathan Wakely --- (In reply to M Welinder from comment #4) > > Explicit casts don't, and that's what I was questioning. > > They most certainly do. I think I understand what you mean now, cases like: int i = std::max(t,

[Bug c++/96570] Warnings desired for time_t to int coversions

2020-08-11 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96570 --- Comment #4 from M Welinder --- > Explicit casts don't, and that's what I was questioning. They most certainly do. That's an empirical statement from having gone over a fairly large code base. It is not a statement that they should occur

[Bug c++/96570] Warnings desired for time_t to int coversions

2020-08-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96570 --- Comment #3 from Jonathan Wakely --- (In reply to M Welinder from comment #2) > Casts occur also in (e.g.) overload resolution and entirely too often in > template soup. And in macros too, I guess. Explicit casts don't, and that's what I

[Bug c++/96570] Warnings desired for time_t to int coversions

2020-08-11 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96570 --- Comment #2 from M Welinder --- > Why? If somebody wants to be explicitly stupid, that's their prerogative. I agree with the second sentence. However, casts are not a clear indication that somebody wants to be explicitly stupid, at least

[Bug c++/96570] Warnings desired for time_t to int coversions

2020-08-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96570 Jonathan Wakely changed: What|Removed |Added Keywords||diagnostic Blocks|