#1059325 bash: printf does not recognise numeric constants with explicit base 10

Package:
bash
Source:
bash
Description:
GNU Bourne Again SHell
Submitter:
Francesco Potortì
Date:
2023-12-22 14:24:04 UTC
Severity:
normal
Tags:
#1059325#5
Date:
2023-12-22 14:12:12 UTC
From:
To:
$ bash --version
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ echo $((10#08))
8

pot@pot:~$ printf %d\\n 10#08
bash: printf: 10#08: invalid number
10

This is clearly a bug: printf should print no error, and just print 8 followed by newline.  However, this only happens on one of my two boxes with Debian testing.  The other one does not exhibit the bug, and printf just prints 8 followed by newline.

I tried with bash --login --noprofile, but nothing changes.