[Bug c++/89871] New: Wall + designated initializers

vincent.hamp at higaski dot at gcc-bugzilla@gcc.gnu.org
Thu Mar 28 18:58:00 GMT 2019


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

            Bug ID: 89871
           Summary: Wall + designated initializers
           Product: gcc
           Version: 8.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincent.hamp at higaski dot at
  Target Milestone: ---

Created attachment 46050
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46050&action=edit
Example fails to compile with -Wall

Using a struct with an anonymous union and trying to assign to it using
designated initializers does not compile with -Wall.

So e.g. 
g++ -std=c++2a -Wall designated_init.cpp

produces
"internal compiler error: side-effects element in no-side-effects CONSTRUCTOR"

The error can be reproduced on 8.1, 8.2 and 8.3. The current trunk however
seems to work.


More information about the Gcc-bugs mailing list