Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Sep 2014 13:01:34 +0000 (UTC)
From:      Marcin Cieslak <saper@saper.info>
To:        freebsd-toolchain@FreeBSD.org
Subject:   error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wc++-compat]
Message-ID:  <alpine.BSF.2.11.1409041251030.44641@m.saper.info>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1409041251030.44641>