This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

/usr/include/bits/in.h is invalid C++


>Submitter-Id:	net
>Originator:	Horst von Brand
>Organization:
  Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
  Casilla 9G, Viņa del Mar, Chile                               +56 32 672616
>
>Confidential:	no
>Synopsis:	struct ip_opts has a member called ip_opts
>Severity:	serious
>Priority:	medium
>Category:	libc
>Class:		sw-bug
>Release:	libc-2.0.108
>Environment:
	
Host type: i586-redhat-linux-gnu
System: Linux sleipnir 2.2.0-pre6 #3 Sat Jan 9 08:48:23 CLST 1999 i586 unknown
Architecture: i586

Addons: crypt linuxthreads
Build CFLAGS: -O2 -march=pentium
Build CC: gcc
Compiler version: egcs-2.92.33 19981226 (gcc2 ss-980609 experimental)
Kernel headers: 2.2.0-pre5-ac1
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: yes
Build bounded: no
Build static-nss: no
Stdio: libio

>Description:
	egcs-19981226 c++ complains that struct ip_opts contains a member
        called the same as the structure.
>How-To-Repeat:
        tst.cc is just:

	#include <netinet/in.h>

        [root@sleipnir /tmp]# c++ tst.cc
        In file included from /usr/include/netinet/in.h:223,
                 from tst.cc:1:
		 /usr/include/bits/in.h:69: ANSI C++ forbids data member
                 ip_opts' with same name as enclosing class
>Fix:
	Something has to be renamed, but I don't know the ramifications.
	


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]