Article View: net.lang.c++
Article #151pointer to function argument bug
From: Bjarne Stroustrup
Date: Wed, 09 Apr 1986 01:42
Date: Wed, 09 Apr 1986 01:42
20 lines
941 bytes
941 bytes
> From: cudcv@daisy.warwick.UUCP (Rob McMahon)
>
> That reminds me - why do I have to say
>
> typedef int (*PF)(int);
> int f ( PF f1 ) { ; }
>
> when I mean
>
> int f ( int (*f1)(int) ) { ; }
>
> which says
>
> "xx.c", line 1: error: syntax error
Because cfront suffers from a dumb YACC grammar. Try
int f ( auto int (*f1)(int) ) { }
PS You don't have the write { ; } when you mean {}
Technical Details
Message-ID:
<5275@alice.uUCp>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!petrus!scherzo!allegra!alice!bsShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!petrus!scherzo!allegra!alice!bs From: bs@alice.UucP (Bjarne Stroustrup) Newsgroups: net.lang.c++ Subject: pointer to function argument bug Message-ID: <5275@alice.uUCp> Date: Tue, 8-Apr-86 20:42:16 EST Article-I.D.: alice.5275 Posted: Tue Apr 8 20:42:16 1986 Date-Received: Thu, 10-Apr-86 06:59:07 EST Organization: Bell Labs, Murray Hill Lines: 20