https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95639
Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egallager at gcc dot gnu.org --- Comment #4 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Marek Polacek from comment #2) > 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. (In reply to Marek Polacek from comment #3) > Not that trivial because it breaks -fdiagnostics-generate-patch. Could you post the patch anyways so we can figure out how to fix it?