Date: Tue, 09 Sep 2014 07:51:51 -0600 From: Ian Lepore <ian@FreeBSD.org> To: Bernd Walter <ticso@cicely7.cicely.de> Cc: freebsd-arm@freebsd.org Subject: Re: compile error in atomic.h when compiling c++ Message-ID: <1410270711.1150.409.camel@revolution.hippie.lan> In-Reply-To: <20140909040224.GA26202@cicely7.cicely.de> References: <20140909040224.GA26202@cicely7.cicely.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2014-09-09 at 06:02 +0200, Bernd Walter wrote: > System is r271289M with clang. > > [114]wandboard# cat test.cc > #include <sys/types.h> > #include <machine/atomic.h> > > int > main(int argc, char *argv[]) > { > return 0; > } > > [115]wandboard# c++ -Wall test.cc > In file included from test.cc:2: > /usr/include/machine/atomic.h:286:8: error: expected identifier > [new] "r" (newval) > ^ > /usr/include/machine/atomic.h:286:11: error: expected expression > [new] "r" (newval) > ^ > 2 errors generated. > Exit 1 > > I assume it has problems with "new" used here, which is a special > keyword in C++. > My bad, fixed in r271310. Jeez, I used to be able to call myself "mostly a C++ programmer" and would automatically not make such a mistake. For the past couple years it seems all I've written is C. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1410270711.1150.409.camel>