From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 4 13:01:40 2014 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B9115BE for ; Thu, 4 Sep 2014 13:01:40 +0000 (UTC) Received: from m.saper.info (m.saper.info [IPv6:2a01:4f8:a0:7383::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "m.saper.info", Issuer "Marcin Cieslak 2011" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 360F613B3 for ; Thu, 4 Sep 2014 13:01:36 +0000 (UTC) Received: from localhost (saper@localhost [127.0.0.1]) by m.saper.info (8.14.9/8.14.9) with ESMTP id s84D1Ycr015922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 4 Sep 2014 13:01:35 GMT (envelope-from saper@saper.info) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=saper.info; s=Sep2014; t=1409835695; bh=0OHW5T+Xq49iKjGKy7B8yRNNW7HdidujwdIQ5QcBHSU=; h=Date:From:To:Subject; b=Qb7BqpEbCgU+ta315KQ+H65Xvr+zCiuwLZN0dncj2yDTtb9zowpc/O4udbCDE46lH NC3RGERVWosASQww+ceLcQ97jl94xg8Urj/boxRV+llmgLJKiGVIJAaSiLxHOLRA/A iJLdhTqIhvTfgmEV2CRjnL0z8Lqrift3F7ijEn+s= Date: Thu, 4 Sep 2014 13:01:34 +0000 (UTC) From: Marcin Cieslak To: freebsd-toolchain@FreeBSD.org Subject: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wc++-compat] Message-ID: User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 13:01:40 -0000 In my clang 3.3 FreeBSD -CURRENT (r259613 as of Dec 2013) I used to have CFLAGS+=-Wc++-compat in my /etc/make.conf probably from some older guide to enable CTF and DTrace. During an upgrade to today's r271089, with this flag (and -Werror) the "make toolchain" command fails on the empty structures, for example struct pthread{} in lib/libc/gen/_pthread_stubs.c Not sure this is a real problem, rather a heads-up to those who did not clean up their make.conf regularly. I don't think I've had this problem with clang 3.3 Old (r271089) clang is: $ clang --version FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 Target: x86_64-unknown-freebsd11.0 Thread model: posix New (being built): $ /usr/obj/usr/src/tmp/usr/bin/clang --version FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd11.0 Thread model: posix //Marcin