This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/64643] bad location for multiple fields in union initialized


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]