From: Daniele Nicolodi <daniele@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] xenomai/asm/xenomai/syscall.h is not c99 aware
Date: Sat, 06 Mar 2010 12:05:01 +0100 [thread overview]
Message-ID: <4B9236DD.2030900@domain.hid> (raw)
Hello. I'm compiling my programs with the -std=c99 switch. However the
inclusion of pthread.h from xenomai distribution causes the compilation
to fail with syntax errors.
This simple program demonstrates the problem:
#include <pthread.h>
int main(int argc, char **argv)
{
return 0;
}
If I compile it with 'gcc -std=c99 $(xeno-config --posis-cflags)' i
obtain the following errors:
In file included from /usr/include/xenomai/nucleus/trace.h:52,
from /usr/include/xenomai/nucleus/system.h:27,
from /usr/include/xenomai/asm/xenomai/system_32.h:130,
from /usr/include/xenomai/asm/xenomai/system.h:2,
from /usr/include/xenomai/nucleus/types.h:40,
from /usr/include/xenomai/nucleus/thread.h:25,
from /usr/include/xenomai/posix/pthread.h:136,
from test-c99.c:1:
/usr/include/xenomai/asm/xenomai/syscall.h:130: error: expected
declaration specifiers or ‘...’ before string constant
/usr/include/xenomai/asm/xenomai/syscall.h:130: warning: data definition
has no type or storage class
/usr/include/xenomai/asm/xenomai/syscall.h:130: warning: type defaults
to ‘int’ in declaration of ‘asm’
/usr/include/xenomai/asm/xenomai/syscall.h: In function ‘__xn_get_ebp’:
/usr/include/xenomai/asm/xenomai/syscall.h:173: warning: statement with
no effect
/usr/include/xenomai/asm/xenomai/syscall.h:173: error: expected ‘;’
before ‘volatile’
/usr/include/xenomai/asm/xenomai/syscall.h: In function ‘__xn_rdtsc’:
/usr/include/xenomai/asm/xenomai/syscall.h:436: warning: statement with
no effect
/usr/include/xenomai/asm/xenomai/syscall.h:436: error: expected ‘;’
before ‘volatile’
In file included from /usr/include/xenomai/nucleus/system.h:27,
from /usr/include/xenomai/asm/xenomai/system_32.h:130,
from /usr/include/xenomai/asm/xenomai/system.h:2,
from /usr/include/xenomai/nucleus/types.h:40,
from /usr/include/xenomai/nucleus/thread.h:25,
from /usr/include/xenomai/posix/pthread.h:136,
from test-c99.c:1:
/usr/include/xenomai/nucleus/trace.h: In function ‘xntrace_max_begin’:
/usr/include/xenomai/nucleus/trace.h:56: error: expected ‘;’ before
‘volatile’
/usr/include/xenomai/nucleus/trace.h:56: warning: statement with no effect
/usr/include/xenomai/nucleus/trace.h: In function ‘xntrace_max_end’:
/usr/include/xenomai/nucleus/trace.h:61: error: expected ‘;’ before
‘volatile’
/usr/include/xenomai/nucleus/trace.h:61: warning: statement with no effect
/usr/include/xenomai/nucleus/trace.h: In function ‘xntrace_max_reset’:
/usr/include/xenomai/nucleus/trace.h:66: error: expected ‘;’ before
‘volatile’
/usr/include/xenomai/nucleus/trace.h:66: warning: statement with no effect
/usr/include/xenomai/nucleus/trace.h: In function ‘xntrace_user_start’:
/usr/include/xenomai/nucleus/trace.h:71: error: expected ‘;’ before
‘volatile’
/usr/include/xenomai/nucleus/trace.h:71: warning: statement with no effect
/usr/include/xenomai/nucleus/trace.h: In function ‘xntrace_user_stop’:
/usr/include/xenomai/nucleus/trace.h:76: error: expected ‘;’ before
‘volatile’
/usr/include/xenomai/nucleus/trace.h:76: warning: statement with no effect
/usr/include/xenomai/nucleus/trace.h: In function ‘xntrace_user_freeze’:
/usr/include/xenomai/nucleus/trace.h:81: error: expected ‘;’ before
‘volatile’
/usr/include/xenomai/nucleus/trace.h:81: warning: statement with no effect
/usr/include/xenomai/nucleus/trace.h: In function ‘xntrace_special’:
/usr/include/xenomai/nucleus/trace.h:87: error: expected ‘;’ before
‘volatile’
/usr/include/xenomai/nucleus/trace.h:87: warning: statement with no effect
/usr/include/xenomai/nucleus/trace.h: In function ‘xntrace_special_u64’:
/usr/include/xenomai/nucleus/trace.h:92: error: expected ‘;’ before
‘volatile’
/usr/include/xenomai/nucleus/trace.h:92: warning: statement with no effect
Of course i do not obtain any error it i remove the xenomai specific
include directories options from the gcc command line.
Can this problem be solved? Can I help somehow?
Thanks. Cheers,
--
Daniele
next reply other threads:[~2010-03-06 11:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 11:05 Daniele Nicolodi [this message]
2010-03-06 11:21 ` [Xenomai-help] xenomai/asm/xenomai/syscall.h is not c99 aware Gilles Chanteperdrix
2010-03-06 11:40 ` Daniele Nicolodi
[not found] ` <4B9531A3.9040308@domain.hid>
[not found] ` <4B9BC623.6020304@domain.hid>
2010-03-17 9:44 ` Daniele Nicolodi
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=4B9236DD.2030900@domain.hid \
--to=daniele@domain.hid \
--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.