From owner-freebsd-bugs Wed Oct 6 11:31:47 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id D95DB1576C for ; Wed, 6 Oct 1999 11:31:16 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id LAA40079; Wed, 6 Oct 1999 11:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Wed, 6 Oct 1999 11:30:02 -0700 (PDT) Message-Id: <199910061830.LAA40079@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Justin T. Gibbs" Subject: Re: bin/13383 sys/netinet/in.h violates C++ spec. Reply-To: "Justin T. Gibbs" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/13383; it has been noted by GNATS. From: "Justin T. Gibbs" To: Jacques Vidrine Cc: Thomas David Rivers , freebsd-gnats-submit@freebsd.org, gibbs@plutotech.com Subject: Re: bin/13383 sys/netinet/in.h violates C++ spec. Date: Wed, 06 Oct 1999 12:23:29 -0600 >On 6 October 1999 at 13:19, Thomas David Rivers wrote: >> I think gcc 2.95.1 "improved" it's standards conformance. It is >> now diagnosing errors previous versions didn't. >> >> Could that be the issue? > >No, see the text of this PR. To summarize: > >g++ version gives error >2.95 yes (according to Justin) >2.7.2.3 no (test case in PR) >2.91.66 no (test case in PR) >2.95.1 no (test case in PR) > >I don't have a position on which is CORRECT, but obviously the latter >is more useful. > >Further, perhaps there is some confusion with regards to the compiler >version Justin is using, or perhaps there is a test case that Justin >has that produces the error. > >Jacques Vidrine / n@nectar.com / nectar@FreeBSD.org [waterboy::pluto]$ /build/gibbs/local/bin/g++ foo.cc -o foo foo.cc:6: redefinition of `struct ip_opts' /usr/include/netinet/in.h:292: previous definition here foo.cc:8: ANSI C++ forbids data member `ip_opts' with same name as enclosing class [waterboy::pluto]$ /build/gibbs/local/bin/g++ -Wall foo.cc -o foo foo.cc:6: redefinition of `struct ip_opts' /usr/include/netinet/in.h:292: previous definition here foo.cc:8: ANSI C++ forbids data member `ip_opts' with same name as enclosing class [waterboy::pluto]$ /build/gibbs/local/bin/g++ -v Reading specs from /build/gibbs/local/lib/gcc-lib/i386-portbld-freebsd3.2/2.95.1/specs gcc version 2.95.1 19990816 (release) in.h does not have any C++ protection, so if in.h has invalid C++ in it, the compiler is right to complain. -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message