Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Sep 2014 06:02:42 +0200
From:      Bernd Walter <ticso@cicely7.cicely.de>
To:        freebsd-arm@freebsd.org
Cc:        Bernd Walter <ticso@cicely7.cicely.de>
Subject:   compile error in atomic.h when compiling c++
Message-ID:  <20140909040224.GA26202@cicely7.cicely.de>

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

-- 
B.Walter <bernd@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



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