delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/01/05:24:11

Date: Fri, 01 Sep 2000 11:31:07 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: giva AT bgnett DOT no
Message-Id: <4634-Fri01Sep2000113107+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b
CC: djgpp AT delorie DOT com
In-reply-to: <Pine.UW2.3.95.1000901075942.4907A-100000@bryggen.bgnett.no>
(message from Gisle Vanem on Fri, 1 Sep 2000 08:00:44 +0200 (MET DST))
Subject: Re: __attribute__ for pointers
References: <Pine DOT UW2 DOT 3 DOT 95 DOT 1000901075942 DOT 4907A-100000 AT bryggen DOT bgnett DOT no>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Fri, 1 Sep 2000 08:00:44 +0200 (MET DST)
> From: Gisle Vanem <giva AT bgnett DOT no>
> 
> extern int (*__printf) (const char *fmt, ...)
> #ifdef __GNUC__
>   __attribute__((format(printf,1,2)))
> #endif
> ;
> 
> Where '__printf' points to either a stdio or a conio-type function.
> 
> But gcc 2.95.2 doesn't seem to allow such '__attribute__' for a pointer;
> 
>  "argument format specified for non-function `__printf'"

Did you try to put __attribute__ inside the parens in (*__printf)?

If that doesn't help either, try using a typedef.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019