From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13850 invoked by alias); 24 Nov 2014 09:16:12 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 13726 invoked by uid 48); 24 Nov 2014 09:16:09 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/64021] Empty struct vs libffi Date: Mon, 24 Nov 2014 09:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg02670.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64021 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek --- Isn't that just because in C++ empty structs are forced by the FE into having length of one byte? I mean, if you: struct S {}; int a = sizeof (struct S); struct S b; then in C it is int a = 0; and b is a common with zero size, while in C++ it is int a = 1; and b has size 1. So it is natural that those two (which are very much different thing) are passed differently, I don't see anything to change on that. So, for go, the question is if it follows GNU C or C++ for empty structs.