Regression with snprintf in MinGW-w64 targeting Win32
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-mingw-w64 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
There are projects that their configure rely on the check `AC_CHECK_
In Ubuntu jammy, this ran without any error:
`
docker run --rm -i ghcr.io/
{
echo "char snprintf();"
echo
echo "int main () { return snprintf (); }"
} >> snprintftest.c
i686-
EOF
`
`
snprintftest.c:1:6: warning: conflicting types for built-in function 'snprintf'; expected 'int(char *, unsigned int, const char *, ...)' [-Wbuiltin-
1 | char snprintf();
| ^~~~~~~~
snprintftest.c:1:1: note: 'snprintf' is declared in header '<stdio.h>'
+++ |+#include <stdio.h>
1 | char snprintf();
`
But ubuntu kinetic:
`
docker run --rm -i ghcr.io/
{
echo "char snprintf();"
echo
echo "int main () { return snprintf (); }"
} >> snprintftest.c
i686-
EOF
`
`
snprintftest.c:1:6: warning: conflicting types for built-in function 'snprintf'; expected 'int(char *, unsigned int, const char *, ...)' [-Wbuiltin-
1 | char snprintf();
| ^~~~~~~~
snprintftest.c:1:1: note: 'snprintf' is declared in header '<stdio.h>'
+++ |+#include <stdio.h>
1 | char snprintf();
/usr/bin/
./build/
collect2: error: ld returned 1 exit status
Error: Process completed with exit code 1.
`
It works with MinGW 10 targeting win64.
Status changed to 'Confirmed' because the bug affects multiple users.