[Bug c++/95639] wrong error location
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 11 13:40:43 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95639
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
With a trivial patch we generate:
95639.C: In function ‘int main()’:
95639.C:6:14: warning: use of old-style cast to ‘int’ [-Wold-style-cast]
6 | return (int) S (a);
| ^
| -----
| static_cast<int> ()
I suspect that's much better.
More information about the Gcc-bugs
mailing list