Hi,
We are trying to port our application to Xenomai 3.2.
The source is c++ and we use in some parts C++11 elements. Therefore the
compile switch is set to -std=c++11.
When now compiling with this option we see following output when using Xenomai
3.2:
In file included from
/home/delphi/sw/oss/IntelliVue-OSS-R18-FEATUREBUILD-5.4-Kernel-88/sdk-iv-monitor/target-sysroot/usr/xenomai/include/cobalt/semaphore.h:24,
from
/home/delphi/sw/oss/IntelliVue-OSS-R18-FEATUREBUILD-5.4-Kernel-88/sdk-iv-monitor/target-sysroot/usr/xenomai/include/cobalt/sys/cobalt.h:25,
from
/home/delphi/sw/oss/IntelliVue-OSS-R18-FEATUREBUILD-5.4-Kernel-88/sdk-iv-monitor/target-sysroot/usr/xenomai/include/copperplate/clockobj.h:113,
from
/home/delphi/sw/oss/IntelliVue-OSS-R18-FEATUREBUILD-5.4-Kernel-88/sdk-iv-monitor/target-sysroot/usr/xenomai/include/alchemy/timer.h:22,
from
/home/delphi/sw/oss/IntelliVue-OSS-R18-FEATUREBUILD-5.4-Kernel-88/sdk-iv-monitor/target-sysroot/usr/xenomai/include/alchemy/heap.h:22,
from ../PROG/Test.cpp:39:
/target-sysroot/usr/xenomai/include/cobalt/uapi/kernel/urw.h: In function 'void
__try_read_start(const urw_t*, urwstate_t*)':
/target-sysroot/usr/xenomai/include/cobalt/uapi/kernel/urw.h:57:19: error:
expected primary-expression before 'volatile'
#define READ_ONCE ACCESS_ONCE
^~~~~~~~~~~
/target-sysroot/usr/xenomai/include/cobalt/uapi/kernel/urw.h:64:10: note: in
expansion of macro 'READ_ONCE'
token = READ_ONCE(urw->sequence);
^~~~~~~~~
/target-sysroot/usr/xenomai/include/cobalt/uapi/kernel/urw.h:57:19: error:
expected ')' before 'volatile'
#define READ_ONCE ACCESS_ONCE
^~~~~~~~~~~
/target-sysroot/usr/xenomai/include/cobalt/uapi/kernel/urw.h:64:10: note: in
expansion of macro 'READ_ONCE'
token = READ_ONCE(urw->sequence);
^~~~~~~~~
This worked with Xenomai 3.1.
It looks like the issue is related to the usage of "typeof" in the ACCESS_ONCE
macro. This seems not to be allowed if you use -std option:
https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate-Keywords
I have now a workaround by defining a macro prior the inclusion of "heap.h":
#define typeof __typeof__
But I am not happy with this. Is there a way to do this better? Is -std now not
allowed with Xenomai?
Thanks,
Gunter Grau
________________________________
The information contained in this message may be confidential and legally
protected under applicable law. The message is intended solely for the
addressee(s). If you are not the intended recipient, you are hereby notified
that any use, forwarding, dissemination, or reproduction of this message is
strictly prohibited and may be unlawful. If you are not the intended recipient,
please contact the sender by return e-mail and destroy all copies of the
original message.