* [ECOS] -isystem and 'Template with C Linkage'
@ 2007-12-05 2:05 John Carter
0 siblings, 0 replies; only message in thread
From: John Carter @ 2007-12-05 2:05 UTC (permalink / raw)
To: ecos-discuss
I have the answer now, so this is just for the next poor sod who gets
bitten by this fairly unlikely scenario...
So I wanted to extend "kapi.h" under ecos-2.0.
I wrote my .h I wrote my .cxx and pulled in "thread.hxx" to access
a certain C++ only method on threads. (stack_check)
Compiled and gcc spits a warning "Template with C linkage" in clist.hxx
Wah!? After a days worth of Googling and deep forensics of the
preprocessor output (Did you know the...
# LINENUM FILENAME FLAGS
... linemarkers encode the C linkage in the FLAGS field?
Anyhoo, after a days worth of hunting inappropriate 'extern "C" {}'
behaviour I stumble on this brief paragraph in the info docs...
"On very old systems, some of the pre-defined system header
directories get even more special treatment. GNU C++ considers
code in headers found in those directories to be surrounded by an
`extern "C"' block. There is no way to request this behavior with
a `#pragma', or from the command line."
Oh dear, the build system I'm using marks the ecos <cyg/kernel/...>
paths as -isystem. Stop doing that and use -I paths to the ecos stuff
and the problem went away.
Sigh! A wasted day.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : john.carter@tait.co.nz
New Zealand
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-05 2:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-05 2:05 [ECOS] -isystem and 'Template with C Linkage' John Carter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).