https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31158

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |NEW
         Resolution|FIXED                       |---

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #3)
> This problem has been resolved since at least 4.8.3.

??? Yesterday's trunk (using -Wno-narrowing):

prog.cc:6:15: warning: overflow in implicit constant conversion [-Woverflow]
 /*   6 */     };
               ^

It seems still broken, just that -Wnarrowing hides the -Woverflow warning.

Possibly still broken in the C FE. In both FEs, the overflow warnings probably
happen way later than the parsing, and once the parsing is done the locations
of the constants are not available anymore. Thus, until either the warnings are
moved somehow closer to the parsing or the locations of the individual
initializers is remembered somehow, this won't get magically fixed.

Note that for re-using the GCC FEs for tooling, the latter approach would be
much more desirable, but we are so far away from such tooling that I'm not sure
it is even a distant goal.

Reply via email to