public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105925] New: [11.1 Regression] Could not convert '{{0, 0.0}}' from '<brace-enclosed initializer list>' to 'X'
@ 2022-06-11  8:53 jehova at existiert dot net
  2022-06-11 12:59 ` [Bug c++/105925] [11/12 " redi at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jehova at existiert dot net @ 2022-06-11  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105925
           Summary: [11.1 Regression] Could not convert '{{0, 0.0}}' from
                    '<brace-enclosed initializer list>' to 'X'
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jehova at existiert dot net
  Target Milestone: ---

struct V
{
    int i;
    double d;
};

struct X
{
    union
    {
        int x;
        V y;
    };
};

X foo()
{
    return {.y = {0, 0.0}};
}

Compilation with 'g++ -std=c++20' works in 11.1 but fails for 11.2 and newer,
particularly in 12.1.

See https://godbolt.org/z/foq9aEs57

The code is also accepted by other major compilers (clang and MSVC).

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-06-24  0:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-11  8:53 [Bug c++/105925] New: [11.1 Regression] Could not convert '{{0, 0.0}}' from '<brace-enclosed initializer list>' to 'X' jehova at existiert dot net
2022-06-11 12:59 ` [Bug c++/105925] [11/12 " redi at gcc dot gnu.org
2022-06-16 13:23 ` [Bug c++/105925] [11/12/13 " marxin at gcc dot gnu.org
2022-06-16 13:23 ` marxin at gcc dot gnu.org
2022-06-16 13:24 ` [Bug c++/105925] [11/12/13 Regression] Could not convert '{{0, 0.0}}' from '<brace-enclosed initializer list>' to 'X' since r12-954-g84fd1b5dff70cd74 marxin at gcc dot gnu.org
2022-06-23 15:42 ` jason at gcc dot gnu.org
2022-06-23 21:16 ` cvs-commit at gcc dot gnu.org
2022-06-23 21:17 ` cvs-commit at gcc dot gnu.org
2022-06-23 21:38 ` cvs-commit at gcc dot gnu.org
2022-06-24  0:45 ` cvs-commit at gcc dot gnu.org
2022-06-24  0:46 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).