From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5117 invoked by alias); 15 Oct 2003 10:44:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 5110 invoked by uid 48); 15 Oct 2003 10:44:22 -0000 Date: Wed, 15 Oct 2003 10:44:00 -0000 Message-ID: <20031015104422.5109.qmail@sources.redhat.com> From: "bruno at clisp dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20031014193706.12615.bruno@clisp.org> References: <20031014193706.12615.bruno@clisp.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/12615] [3.3 Regression] initializer syntax for POD structs gives parse error X-Bugzilla-Reason: CC X-SW-Source: 2003-10/txt/msg01049.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12615 ------- Additional Comments From bruno at clisp dot org 2003-10-15 10:44 ------- Gabriel dos Reis writes: > There is a standard way to express an equivalent construct. I would strongly > suggest you use it. The problem with this is that it is not a syntax which is valid in initializers _and_ expressions. I'd need to write void gc_mark (object obj) { // Initializer syntax object a = { one_o: 0, allocstamp: 0 }; // Expression syntax object b; b = (object) { one_o: 0, allocstamp: 0 }; } This means that for all of my macros returning a constructed 'object', I'd need two variants: one for use in initializers and one for use in expressions. This is not reasonable. Can't you give me a syntax which - works both in expressions and initializers, - preferrably also works the same way in GNU C?