On Sat, Aug 28, 2021 at 04:16:11PM -0400, Thomas Dickey wrote:
> On Sat, Aug 28, 2021 at 03:47:37PM +0200, Christian Göttsche wrote:
> > On Sat, 28 Aug 2021 at 15:27, Thomas Dickey <dic...@his.com> wrote:
> > >
> > > sure - they're conditioned on a nonstandard extension to C.
> > > Debian can provide some patch which hardcodes that condition,
> > > but as I recall it, there's no clean way to provide this in
> > > standard C.
> > >
> > 
> > Yes, these function attributes are GNU extensions.
> > But GCC_PRINTFLIKE is defined via `__attribute__`[1], and if __GNUC__
> > is not set, `__attribute__` is defined empty.
> > So the attributes are only enabled if the compiler defines __GNUC__
> > and then the compiler should support those.
> 
> I believe you're misreading the source-code.
> 
> The GCC_PRINTF symbol is defined if the (build-time) configure check decides
> that the compiler supports the feature (i.e., while the compiler may accept
> __attribute__, it may not accept a particular parameter).  Ditto for 
> GCC_SCANF.

however, on review I agree that I can drop those symbols from the header
file (it's been redundant in building any of my programs for some time).

-- 
Thomas E. Dickey <dic...@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to