Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Oct 1999 21:20:03 -0700 (PDT)
From:      Jacques Vidrine <n@nectar.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/13383 sys/netinet/in.h violates C++ spec.
Message-ID:  <199910060420.VAA17719@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/13383; it has been noted by GNATS.

From: Jacques Vidrine <n@nectar.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/13383 sys/netinet/in.h violates C++ spec.
Date: Tue, 05 Oct 1999 23:13:09 -0500

 Can you send example code?  A brief test here doesn't turn up an
 error.  What specific version of gcc 2.95 are you using?  Perhaps this
 was fixed in 2.95.1?
 
 Though ANSI C++ may forbid such a construct, a conforming C++ compiler
 should accept legal ANSI C when it is specified as such (using extern
 "C" or whatever).
 
 --- test.cc ---
 #include <sys/types.h>
 #include <netinet/in.h>
 #include <string.h>
 
 void 
 foo()
 {
 	struct ip_opts my_ip_opts;
 	memset(my_ip_opts.ip_opts, 0, sizeof(my_ip_opts.ip_opts));
 }
 --- test.cc ---
 
 % g++295 -Wall -c test.cc
 % echo $?
 0
 % g++295 -v
 Reading specs from /opt/lib/gcc-lib/i386-portbld-freebsd3.3/2.95.1/specs
 gcc version 2.95.1 19990816 (release)
 
 Jacques Vidrine / n@nectar.com / nectar@FreeBSD.org
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910060420.VAA17719>