[PATCH v1] ld: bring vfinfo() in parity with printf() for format specifiers ll[d|i|x]

Hans-Peter Nilsson hp@axis.com
Fri Jan 23 15:05:05 GMT 2026


> From: Matthieu Longo <matthieu.longo@arm.com>
> Date: Thu, 22 Jan 2026 17:51:46 +0000

> @@ -567,10 +578,20 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
>  	      break;
>  
>  	    case 'l': /* (Unsigned) long integer, like printf().  */
> +	      bool ll_type = false;
> +	      if (*fmt == 'l')
> +		{

Looks like this is yours:

In file included from ../bfd/bfd.h:45,
                 from /hp/autotest/hpautotest-binutils/bsrc/src/ld/ldmisc.c:23:
/hp/autotest/hpautotest-binutils/bsrc/src/ld/ldmisc.c: In function 'vfinfo':
/hp/autotest/hpautotest-binutils/bsrc/src/ld/ldmisc.c:186:8: error: a label can only be part of a statement and a declaration is not a statement
  186 |        bool ll_type = false;
      |        ^~~~
/hp/autotest/hpautotest-binutils/bsrc/src/ld/ldmisc.c:581:8: error: a label can only be part of a statement and a declaration is not a statement
  581 |        bool ll_type = false;
      |        ^~~~
make[4]: *** [Makefile:1606: ldmisc.o] Error 1

It's be really nice if you could fix this ASAP, pretty
please with sugar on top.  Debian 10 here, i.e. gcc-10.2
(but blaming that as quirky is not a valid excuse).

brgds, H-P


More information about the Binutils mailing list