/usr/include/bits/in.h is invalid C++
Horst von Brand
vonbrand@sleipnir.valparaiso.cl
Thu Apr 1 00:00:00 GMT 1999
>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.
More information about the Libc-alpha
mailing list