[Bug c++/64643] bad location for multiple fields in union initialized
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jan 18 13:47:00 GMT 2015
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.
More information about the Gcc-bugs
mailing list