🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

struct inside extern bug

#302
From: Michael Tiemann
Date: Fri, 28 Jul 1989 04:39
38 lines
1248 bytes
   Date: Wed, 26 Jul 89 17:41:58 EDT 
   From: David.Detlefs@f.gp.cs.cmu.edu

   Gurus,

   The following program

   --------------------------------------------------
   extern "C" {
     struct foo {
       int i;
     };
   }

   class bar {
     foo* f;
   };
   --------------------------------------------------

   produces the following message:

   bug3.c:8: parse error before `*'

   using g++-1.35.0

   I guess there are a few wrinkles in the "extern" stuff to be ironed
   out.

   Hope this helps...

   Dave

Yeah.  The wrinkle is that I don't throw C struct names into the
identifier name space WHEN THEY APPEAR IN `extern "C"'.  That is,
things wrappen in `extern "C"' behave like they are supposed to in C.

Michael
Technical Details
Message-ID: <8907280439.AA28498@yahi.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!iuvax!mailrus!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!tiemann
References: <8907262142.AA17745@AENEAS.MIT.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!iuvax!mailrus!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!tiemann
From: tiemann@YAHI.STANFORD.EDU (Michael Tiemann)
Newsgroups: gnu.g++.bug
Subject: struct inside extern bug
Message-ID: <8907280439.AA28498@yahi.Stanford.EDU>
Date: 28 Jul 89 04:39:41 GMT
References: <8907262142.AA17745@AENEAS.MIT.EDU>
Sender: singhal@tut.cis.ohio-state.edu
Reply-To: tiemann@lurch.stanford.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 38