From: Victor Hiairrassary <victor.hiairrassary.ml@gmail.com>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] xenomai "does not" ISO C, C99 and C++ standard
Date: Sun, 28 Apr 2013 16:12:59 +0200 [thread overview]
Message-ID: <517D2E6B.3050601@gmail.com> (raw)
In-Reply-To: <517C5DD3.3060809@xenomai.org>
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
next prev parent reply other threads:[~2013-04-28 14:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 8:06 [Xenomai] xenomai "does not" ISO C, C99 and C++ standard Victor Hiairrassary
2013-04-23 8:21 ` Gilles Chanteperdrix
2013-04-23 19:09 ` Gilles Chanteperdrix
2013-04-27 23:22 ` Gilles Chanteperdrix
2013-04-28 14:12 ` Victor Hiairrassary [this message]
2013-04-28 13:11 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=517D2E6B.3050601@gmail.com \
--to=victor.hiairrassary.ml@gmail.com \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.