public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* arm-linux-g++ error
@ 2000-11-30  8:57 Nick Bane
  0 siblings, 0 replies; only message in thread
From: Nick Bane @ 2000-11-30  8:57 UTC (permalink / raw)
  To: crossgcc; +Cc: Wookey, Toby Churchill

Hello,

I am cross-compiling c++ source on a x86 for an arm-linux target (iPaq
Bitsy). In general this seems to work well and I can build most things ok.

However, I seem to have come across an anomaly. When including /netinet/in.h
for use with AF_INET sockets, arm-linux-gcc comes up with the c++ error
below stating that ANSI-C++ forbids a field being declared with the same
name as its enclosing class. There is no such problem with the x86 gcc.

The error message is:
/usr/arm-linux/include/bits/in.h:69: ANSI C++ forbids data member `ip_opts'
with same name as enclosing class

The code snippet from /usr/arm-linux/include/bits/in.h is:

struct ip_opts
  {
    struct in_addr ip_dst;      /* First hop; zero without source route.  */
    char ip_opts[40];           /* Actually variable in size.  */
  };

The include file is the same as in the x86 version and placing rubbish
around the declaration flips the x86 compiler out with error messages so the
code actually is being included.

The compiler versions are different in only their minor numbers.
gcc version 2.95.2 20000220 (Debian GNU/Linux)
gcc version 2.95.2 20000313 (Debian GNU/Linux)

The compiler invocations are:
arm-linux-g++  -g -Wall -I- -I. -I/usr/arm-linux/include -I/usr/arm-linux/in
clude/dtk -fsigned-char -c tcltts.cpp -o tcltts.o
and
g++  -g -Wall -I- -I.  -I/usr/include/ -I/usr/include/dtk -fsigned-char -c
tcltts.cpp -o tcltts.o


Any thoughts or fixes out there?

Nick Bane
nick@cecomputing.co.uk


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-11-30  8:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-30  8:57 arm-linux-g++ error Nick Bane

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).