On 04/28/2013 01:22 AM, Gilles Chanteperdrix wrote:
Hi Victor,
I have tried and fix this issue in Xenomai repository
(git://xenomai.org/xenomai-2.6.git), the errors disappeared completely
for the native and posix skins headers in C. The modifications made to
the posix headers for C do not seem to work for C++. It would be
interesting if you could download and try it.
Without "-pedantic-errors", including posix headers in a C++ program
simply triggers warning.
Regards.
Hello,
I have tried with these settings (board apf27 : arm imx27):
xenomai_ver = f60f1a4f758a7d9b010f39f439eb98240b7beb42
xenomai_site = git://git.xenomai.org/xenomai-2.6.git
buildroot: 2013.02
gcc: 4.7.2
libc: eglibc 2_12
busybox: 1.21.0
U-Boot: custom (2012.04)
Linux: 2.6.38.8
I have tested a simple program (available in attached file compiler
command lines and logs) in c90, c99, c++03 and c++11 standard.
Only c++11 have no warning !
Do not hesitate if you have other questions !
Best regards,
Victor Hiairrassary
-------------- next part --------------
#include <native/task.h>
#include <native/mutex.h>
#include <native/queue.h>
#include <native/event.h>
#include <native/alarm.h>
#include <native/buffer.h>
#include <native/pipe.h>
#include <native/cond.h>
#include <native/sem.h>
#include <native/intr.h>
#include <native/heap.h>
#include <time.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
#include <sys/mman.h>
#include <pthread.h>
#include <mqueue.h>
#include <posix/posix.h>
int main()
{
return 0;
}
- C : c90 : a lot of warnings
=======================
toolchain/bin/arm-linux-gcc main.c -I toolchain/include/xenomai -W -Wall
-pedantic
In file included from toolchain/include/xenomai/asm/xenomai/atomic.h:26:0,
from toolchain/include/xenomai/nucleus/system.h:26,
from toolchain/include/xenomai/asm/xenomai/system.h:260,
from toolchain/include/xenomai/nucleus/types.h:36,
from toolchain/include/xenomai/nucleus/thread.h:25,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/asm/xenomai/features.h:151:1: warning: C++ style
comments are not allowed in ISO C90 [enabled by default]
toolchain/include/xenomai/asm/xenomai/features.h:151:1: warning: (this will be
reported only once per input file) [enabled by default]
In file included from toolchain/include/xenomai/nucleus/trace.h:52:0,
from toolchain/include/xenomai/nucleus/system.h:27,
from toolchain/include/xenomai/asm/xenomai/system.h:260,
from toolchain/include/xenomai/nucleus/types.h:36,
from toolchain/include/xenomai/nucleus/thread.h:25,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/asm-generic/xenomai/syscall.h:44:16: warning: ISO C90
does not support 'long long' [-Wlong-long]
In file included from toolchain/include/xenomai/nucleus/trace.h:53:0,
from toolchain/include/xenomai/nucleus/system.h:27,
from toolchain/include/xenomai/asm/xenomai/system.h:260,
from toolchain/include/xenomai/nucleus/types.h:36,
from toolchain/include/xenomai/nucleus/thread.h:25,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/asm/xenomai/tsc.h:37:25: warning: ISO C90 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/asm/xenomai/tsc.h:43:23: warning: ISO C90 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/asm/xenomai/tsc.h:51:29: warning: ISO C90 does not
support 'long long' [-Wlong-long]
In file included from toolchain/include/xenomai/nucleus/system.h:27:0,
from toolchain/include/xenomai/asm/xenomai/system.h:260,
from toolchain/include/xenomai/nucleus/types.h:36,
from toolchain/include/xenomai/nucleus/thread.h:25,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/nucleus/trace.h:69:57: warning: ISO C90 does not
support 'long long' [-Wlong-long]
In file included from toolchain/include/xenomai/nucleus/types.h:36:0,
from toolchain/include/xenomai/nucleus/thread.h:25,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/asm/xenomai/system.h:267:1: warning: C++ style
comments are not allowed in ISO C90 [enabled by default]
toolchain/include/xenomai/asm/xenomai/system.h:267:1: warning: (this will be
reported only once per input file) [enabled by default]
In file included from toolchain/include/xenomai/nucleus/thread.h:25:0,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/nucleus/types.h:48:23: warning: ISO C90 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/nucleus/types.h:50:14: warning: ISO C90 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/nucleus/types.h:52:23: warning: ISO C90 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/nucleus/types.h:54:14: warning: ISO C90 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/nucleus/types.h:133:18: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
toolchain/include/xenomai/nucleus/types.h:134:19: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
toolchain/include/xenomai/nucleus/types.h:135:19: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
toolchain/include/xenomai/nucleus/types.h:136:18: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
toolchain/include/xenomai/nucleus/types.h:137:27: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
toolchain/include/xenomai/nucleus/types.h:139:21: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
In file included from toolchain/include/xenomai/nucleus/sched.h:31:0,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/nucleus/thread.h:144:16: warning: ISO C90 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/nucleus/thread.h:146:16: warning: ISO C90 does not
support 'long long' [-Wlong-long]
In file included from toolchain/include/xenomai/native/task.h:26:0,
from main.c:1:
toolchain/include/xenomai/native/types.h:59:23: warning: ISO C90 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/native/types.h:61:14: warning: ISO C90 does not
support 'long long' [-Wlong-long]
- C : c99 :
===========
toolchain/bin/arm-linux-gcc main.c -I toolchain/include/xenomai -o m -W
-Wall -pedantic -std=c99
In file included from main.c:1:0:
toolchain/include/xenomai/native/task.h:113:5: error: unknown type name
'caddr_t'
In file included from main.c:3:0:
toolchain/include/xenomai/native/queue.h:63:2: error: unknown type name
'caddr_t'
In file included from main.c:11:0:
toolchain/include/xenomai/native/heap.h:64:2: error: unknown type name 'caddr_t'
- C++ : c++03
=============
toolchain/bin/arm-linux-g++ main.c -I toolchain/include/xenomai -o m -W
-Wall -pedantic
In file included from toolchain/include/xenomai/nucleus/thread.h:25:0,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/nucleus/types.h:133:18: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
toolchain/include/xenomai/nucleus/types.h:134:19: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
toolchain/include/xenomai/nucleus/types.h:135:19: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
toolchain/include/xenomai/nucleus/types.h:136:18: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
toolchain/include/xenomai/nucleus/types.h:137:27: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
toolchain/include/xenomai/nucleus/types.h:139:21: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
In file included from toolchain/include/xenomai/nucleus/trace.h:52:0,
from toolchain/include/xenomai/nucleus/system.h:27,
from toolchain/include/xenomai/asm/xenomai/system.h:260,
from toolchain/include/xenomai/nucleus/types.h:36,
from toolchain/include/xenomai/nucleus/thread.h:25,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/asm-generic/xenomai/syscall.h:44:2: warning: ISO C++
1998 does not support 'long long' [-Wlong-long]
In file included from toolchain/include/xenomai/nucleus/trace.h:53:0,
from toolchain/include/xenomai/nucleus/system.h:27,
from toolchain/include/xenomai/asm/xenomai/system.h:260,
from toolchain/include/xenomai/nucleus/types.h:36,
from toolchain/include/xenomai/nucleus/thread.h:25,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/asm/xenomai/tsc.h:37:2: warning: ISO C++ 1998 does
not support 'long long' [-Wlong-long]
toolchain/include/xenomai/asm/xenomai/tsc.h:43:1: warning: ISO C++ 1998 does
not support 'long long' [-Wlong-long]
toolchain/include/xenomai/asm/xenomai/tsc.h:51:1: warning: ISO C++ 1998 does
not support 'long long' [-Wlong-long]
In file included from toolchain/include/xenomai/nucleus/system.h:27:0,
from toolchain/include/xenomai/asm/xenomai/system.h:260,
from toolchain/include/xenomai/nucleus/types.h:36,
from toolchain/include/xenomai/nucleus/thread.h:25,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/nucleus/trace.h:69:43: warning: ISO C++ 1998 does not
support 'long long' [-Wlong-long]
In file included from toolchain/include/xenomai/nucleus/thread.h:25:0,
from toolchain/include/xenomai/nucleus/sched.h:31,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/nucleus/types.h:48:1: warning: ISO C++ 1998 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/nucleus/types.h:50:1: warning: ISO C++ 1998 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/nucleus/types.h:52:1: warning: ISO C++ 1998 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/nucleus/types.h:54:1: warning: ISO C++ 1998 does not
support 'long long' [-Wlong-long]
In file included from toolchain/include/xenomai/nucleus/sched.h:31:0,
from toolchain/include/xenomai/native/task.h:25,
from main.c:1:
toolchain/include/xenomai/nucleus/thread.h:144:2: warning: ISO C++ 1998 does
not support 'long long' [-Wlong-long]
toolchain/include/xenomai/nucleus/thread.h:146:2: warning: ISO C++ 1998 does
not support 'long long' [-Wlong-long]
In file included from toolchain/include/xenomai/native/task.h:26:0,
from main.c:1:
toolchain/include/xenomai/native/types.h:59:1: warning: ISO C++ 1998 does not
support 'long long' [-Wlong-long]
toolchain/include/xenomai/native/types.h:61:1: warning: ISO C++ 1998 does not
support 'long long' [-Wlong-long]
- C++ : c++11 :
===============
toolchain/bin/arm-linux-g++ main.c -I toolchain/include/xenomai -o m -W
-Wall -pedantic -std=c++11
No error at all in c++11 :D
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai