Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2000 12:10:03 -0800 (PST)
From:      "Jacques A . Vidrine" <n@nectar.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/13383 sys/netinet/in.h violates C++ spec.
Message-ID:  <200003302010.MAA10597@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 A . Vidrine" <n@nectar.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/13383 sys/netinet/in.h violates C++ spec.
Date: Thu, 30 Mar 2000 14:06:49 -0600

 I believe this PR should be closed with no action, because:
 
   + Recent activities by the C++ Standards working group indicates
     that though the current version of the standard prohibits structures
     like ip_opts, this was a mistake made in 1996 that will be corrected
     in a future version of the standard (excerpt below, snarfed from
     http://wwwold.dkuug.dk/JTC1/SC22/WG21/docs/core8.htm).
 
   + egcs allows this construction when it is encountered within
     ``extern "C"'' .  This is non-standard, but practical.  This
     feature was added by Jason Merrill <jason@cygnus.com> in revision
     1.282 of gcc/cp/decl.c on 12 Dec 1998.
 
 ===== begin excerpt =====
 Document number:  J16/99-0032 = WG21 N1208
            Date:  23 February, 2000       
         Project:  Programming Language C++
       Reference:  ISO/IEC IS 14882:1998(E)
        Reply to:  William M. Miller       
                   wmm@fastdial.net        
 
 
             C++ Standard Core Language Issues List, Revision 9             
 
 80. Class members with same name as class
 
 Section: 9.2 class.mem    Status: review   Submitter: Jason Merrill   Date:
 5 Dec 1998
 
 Between the May '96 and September '96 working papers, the text in 9.2
 class.mem paragraph 13:
    
     If T is the name of a class, then each of the following shall have a
     name different from T:
       +  every static data member of class T;
 
 was changed by removing the word 'static'. Looking over the meeting minutes
 from Stockholm, none of the proposals seem to include this change, which
 breaks C compatibility and is not mentioned in the compatibility annex. Was
 this change actually voted in by the committee?
 
 Specifically, this breaks /usr/include/netinet/in.h under Linux, in which
 "struct ip_opts" shares its name with one of its members.
 
 Proposed resolution (10/99):
    
  1. Change the first bullet of 9.2 class.mem paragraph 13 to say
       +  every static data member of class T;
  2. Add another paragraph before 9.2 class.mem paragraph 14, reading
         In addition, if class T has a user-declared constructor (12.1
         class.ctor ), every nonstatic data member of class T shall have a
         name different from T.
 =====  end excerpt  =====
 -- 
 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?200003302010.MAA10597>