public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/105510] New: [12] error: initializer element is not constant
@ 2022-05-06 18:55 570070308 at qq dot com
  2022-05-09  8:04 ` [Bug c/105510] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: 570070308 at qq dot com @ 2022-05-06 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105510
           Summary: [12] error: initializer element is not constant
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 570070308 at qq dot com
  Target Milestone: ---

clang can success compile it but gcc can't. MSVC can't too, I'm not sure this
is a bug.
test.c
```
struct Test2
{
    long int x;
    long int y;
};

struct Test
{
    long int x;
    struct Test2 t;
};

struct Test t=(struct Test){1, (struct Test2){3, 4}};
```
gcc version: gcc-11.3 or gcc-12.0.1

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

end of thread, other threads:[~2023-12-04 13:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 18:55 [Bug c/105510] New: [12] error: initializer element is not constant 570070308 at qq dot com
2022-05-09  8:04 ` [Bug c/105510] " rguenth at gcc dot gnu.org
2022-05-09 12:21 ` 570070308 at qq dot com
2022-05-09 13:00 ` jakub at gcc dot gnu.org
2022-05-09 20:39 ` joseph at codesourcery dot com
2023-12-04 13:46 ` andy.shevchenko at gmail dot com

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).