On Sat, Jun 13, 2026 at 12:50:44PM +0300, Herman wrote:
> Hi. Trying to compile gforth on Gentoo, gcc 15.2.1
> 
> I'm getting these errors. Any help?
> 
> /usr/include/x86_64-pc-linux-gnu/bfd.h:2585:6: error: old-style parameter 
> declarations in prototyped function definition
>  2585 | void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
>       |      ^~~~~~~~~~~~~~~~~~

It's unclear to me why that happens; the compiler might see the stuff
expanded from ATTRIBUTE_PRINTF_1 as "old-style parameter declarations",
but at least in Debian 12 the relevant macro definitions are:

ansidecl.h
126:#ifndef ATTRIBUTE_NONNULL
128:#  define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
130:#  define ATTRIBUTE_NONNULL(m)
132:#endif /* ATTRIBUTE_NONNULL */
157:#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, 
n))) ATTRIBUTE_NONNULL(m)
158:#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)

and I don't see that this produces an old-style parameter declaration.

> /home/herman/prog/build/gforth-0.7.9_20260610/lib/gforth/0.7.9_20260610/amd64/libcc-named/disasm2.c:129:
>  error: expected '{' at end of input

On my system the line before is:

hash_128 gflibcc_hash_disasm2 = { 
0x32,0x5C,0x60,0x83,0x70,0xE4,0x64,0x50,0x2C,0xE5,0xD2,0xCC,0x90,0x2C,0x1F,0x41 
};

I don't know why the C compiler would expect a "{" after that.

- anton

Reply via email to