🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1813

problem with pointers to members

#1813
From: James Clark
Date: Sun, 02 Apr 1989 09:10
28 lines
1242 bytes
g++ rejects a valid program:

Script started on Sun Apr  2 08:52:56 1989
jclark% cat test.c
struct foo {
  void bar(int foo::*p);
};

void foo::bar(int foo::*p)
{
}

jclark% g++ -c -v test.c
g++ version 1.34.1
 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ test.c /tmp/cca27586.cpp
GNU CPP version 1.34
 /usr/local/lib/gcc-c++ /tmp/cca27586.cpp -quiet -dumpbase test.c -version -o /tmp/cca27586.s
GNU C++ version 1.34.1 (sparc) compiled by GNU C version 1.34.
In method foo::bar ((struct foo ::*)):
test.c:6: conflicting types for `void foo::bar ((struct foo ::*))'
test.c:2: previous declaration of `void foo::bar ((struct foo ::*))'
jclark% exit
jclark% 
script done on Sun Apr  2 08:53:22 1989

James Clark
jjc@jclark.uucp
uunet!mcvax!jclark!jjc
Technical Details
Message-ID: <8904020910.AA27649@jclark.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!jclark!jjc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!jclark!jjc
From: mcvax!jclark!jjc@UUNET.UU.NET (James Clark)
Newsgroups: gnu.g++.bug
Subject: problem with pointers to members
Message-ID: <8904020910.AA27649@jclark.uucp>
Date: 2 Apr 89 09:10:53 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 28