This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71985] narrowing in initializer lists is not ill-formed where required
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 24 Jul 2016 15:55:05 +0000
- Subject: [Bug c++/71985] narrowing in initializer lists is not ill-formed where required
- Auto-submitted: auto-generated
- References: <bug-71985-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71985
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC|manu at gcc dot gnu.org |
Resolution|--- |DUPLICATE
--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I also realize that the "inconsistency" issue is just because of my erroneous
interpretation of why we give a warning versus and error. There is no concept
of lossy conversions, thus I have updated the FAQ to remove any mention of such
a thing and just directly quote the manual:
https://gcc.gnu.org/wiki/FAQ#Wnarrowing
It is documented now that we give a warning for constants and an error for
non-constants and the rationale is simply that constant cases are easier to fix
than non-constant cases. I may disagree with this heuristic, but I don't care
enough about this topic to propose and argue for a patch implementing an
alternative, thus it is good enough for me.
Sorry for reopening this, I should have left it as it was.
*** This bug has been marked as a duplicate of bug 55783 ***