This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64643] bad location for multiple fields in union initialized
- 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, 18 Jan 2015 13:46:59 +0000
- Subject: [Bug c++/64643] bad location for multiple fields in union initialized
- Auto-submitted: auto-generated
- References: <bug-64643-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64643
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-01-18
CC| |manu at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
You can find the code in gcc/cp/class.c. You'll need to replace:
error ("multiple fields in union %qT initialized", t);
with something like:
error_at (loc2, "multiple fields in union %qT initialized", t);
inform (loc1, "a field is already initialized here");
where the tricky part is to set loc1 and loc2 appropriately.