delorie.com/archives/browse.cgi | search |
Date: | Fri, 1 Sep 2000 08:00:44 +0200 (MET DST) |
From: | Gisle Vanem <giva AT bgnett DOT no> |
To: | djgpp AT delorie DOT com |
Subject: | __attribute__ for pointers |
Message-ID: | <Pine.UW2.3.95.1000901075942.4907A-100000@bryggen.bgnett.no> |
MIME-Version: | 1.0 |
Reply-To: | djgpp AT delorie DOT com |
I'm having trouble with declaring a function-pointer with an '__attribute__'. This is what I have: 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'" Any idea how this can be fixed? Gisle V.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |