Article View: net.lang.c++
Article #298won't compile
From: Bjarne Stroustrup
Date: Fri, 05 Sep 1986 15:18
Date: Fri, 05 Sep 1986 15:18
33 lines
1206 bytes
1206 bytes
> From: brian@uw-june (Brian Bershad)
> Organization: U of Washington Computer Science, Seattle
> Keywords: pointers, functions, won't compile
>
> The following won't compile:
>
> --------------------------------
> typedef char * memory ;
>
> struct S {
> memory (*A)(), memory (*B)(); // this is a syntax error
> };
>
> ---
> but
> ---
>
> Struct S {
> memory (*A)();
> memory (*B)();
> };
>
> will.
>
> I am still running 1.0 relE here... is this something that has been
> fixed?
>
> The headache is because the former compiles using /bin/cc and
> I am trying to integrate old C code with some new C++ stuff
> (this is \supposed/ to work....)
Yes, both examples ought to work, but there is a bug in cfront.
Still not fixed in 1.1. Sorry.
Technical Details
Message-ID:
<6019@alice.uUCp>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!caip!princeton!allegra!alice!bsShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!caip!princeton!allegra!alice!bs From: bs@alice.UucP (Bjarne Stroustrup) Newsgroups: net.lang.c++ Subject: won't compile Message-ID: <6019@alice.uUCp> Date: Fri, 5-Sep-86 11:18:28 EDT Article-I.D.: alice.6019 Posted: Fri Sep 5 11:18:28 1986 Date-Received: Fri, 5-Sep-86 22:09:53 EDT Organization: Bell Labs, Murray Hill Lines: 33