public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: vencain@swbell.net To: gcc-gnats@gcc.gnu.org Subject: c++/10207: Empty structure initialization fails under C++ (but works under C) Date: Tue, 25 Mar 2003 08:36:00 -0000 [thread overview] Message-ID: <20030325081832.8348.qmail@sources.redhat.com> (raw) >Number: 10207 >Category: c++ >Synopsis: Empty structure initialization fails under C++ (but works under C) >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Mar 25 08:26:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Marcus VenCain >Release: gcc version 3.2 20020903 >Organization: >Environment: (Red Hat Linux 8.0 3.2-7) >Description: Compiling the provided code works under C while producing the following using either gcc or g++: parse error before `}' token excess elements in aggregate initializer The provided code is derived from headers designed for C programs that I must include but am not responsible for maintaining. >How-To-Repeat: typedef struct { } EmptyStruct; typedef struct {EmptyStruct Empty;} DemoStruct; void Func(void) { DemoStruct Demo; Demo.Empty = (EmptyStruct) {}; } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2003-03-25 8:29 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-03-25 8:36 vencain [this message] 2003-03-25 16:06 bangerth 2003-03-26 1:46 David R. Whipple
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030325081832.8348.qmail@sources.redhat.com \ --to=vencain@swbell.net \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).