[Bug c++/92856] incorrectly accepts invalid C++11 braced initialisation of double from long double

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Dec 8 21:10:00 GMT 2019


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The standard requires a diagnostic for this, and GCC issues a diagnostic. The
behaviour is by design and not a bug.

Use -Werror=narrowing if you want an error.


More information about the Gcc-bugs mailing list