Thread View: muc.lists.freebsd.bugs
5 messages
5 total messages
Started by bugzilla-noreply
Tue, 20 Oct 2026 09:39
[Bug 299631] Compiling with: "clang -Wall test.cxx -lc++": clang(1) produces an error/warning due to the printf(3) conversion.
Author: bugzilla-noreply
Date: Tue, 20 Oct 2026 09:39
Date: Tue, 20 Oct 2026 09:39
53 lines
3629 bytes
3629 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299631
Bug ID: 299631
Summary: Compiling with: "clang -Wall test.cxx -lc++":
clang(1) produces an error/warning due to the
printf(3) conversion.
Product: Base System
Version: 14.5-RELEASE
Hardware: amd64
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs@FreeBSD.org
Reporter: linimon@FreeBSD.org
[Note: submitted on behalf of user who requests anonymity 20261019.]
In this example program (i.e. test.cxx):
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
int main (void) {
uint64_t blah = 1234;
printf ("%w64u\n", blah);
exit (0);
}
Compiling with: "clang -Wall test.cxx -lc++":
clang(1) produces an error/warning due to the printf(3) conversion.
I can't remember exactly what the error/warning was/is, but I checked the
manual page for printf(3) several times and as far as I can tell the above
printf(3) syntax is correct (according to the manual page).
There was another "bug" which had to do with the printf(3) manual page being
unreadable (I checked the OpenBSD manual page for it - which is readable).
Note that the above test program is recalled from memory .... I'm typing this
on an apple mac computer - not my freebsd one.
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
[Bug 299631] Compiling with: "clang -Wall test.cxx -lc++": clang(1) produces an error/warning due to the printf(3) conversion.
Author: bugzilla-noreply
Date: Wed, 21 Oct 2026 14:28
Date: Wed, 21 Oct 2026 14:28
28 lines
3065 bytes
3065 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299631
Ed Maste <emaste@freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |emaste@freebsd.org
Status|New |Closed
Resolution|--- |Not Accepted
--- Comment #1 from Ed Maste <emaste@freebsd.org> ---
the warning is very explicit about the error:
x.cc:6:12: warning: invalid conversion specifier '6'
[-Wformat-invalid-specifier]
6 | printf ("%w64u\n", blah);
| ~~^
please check printf(3) again
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
[Bug 299631] Compiling with: "clang -Wall test.cxx -lc++": clang(1) produces an error/warning due to the printf(3) conversion.
Author: bugzilla-noreply
Date: Wed, 21 Oct 2026 15:18
Date: Wed, 21 Oct 2026 15:18
18 lines
2805 bytes
2805 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299631 --- Comment #4 from Dag-Erling Smørgrav <des@FreeBSD.org> --- I'll correct myself: this has in fact been fixed upstream and should work with clang 22 or newer, provided you compile with the correct -std setting (the default is gnu17 / gnu++17; you need at least c23 / gnu23 / c++23 / gnu++23). We don't have clang 22 or 23 in base yet, but they are available from ports. -- You are receiving this mail because: You are the assignee for the bug. -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
[Bug 299631] Compiling with: "clang -Wall test.cxx -lc++": clang(1) produces an error/warning due to the printf(3) conversion.
Author: bugzilla-noreply
Date: Wed, 21 Oct 2026 15:18
Date: Wed, 21 Oct 2026 15:18
16 lines
2672 bytes
2672 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299631
Dag-Erling Smørgrav <des@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|Please Upstream |Works As Intended
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
[Bug 299631] Compiling with: "clang -Wall test.cxx -lc++": clang(1) produces an error/warning due to the printf(3) conversion.
Author: bugzilla-noreply
Date: Mon, 26 Oct 2026 13:47
Date: Mon, 26 Oct 2026 13:47
35 lines
3180 bytes
3180 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299631
--- Comment #5 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=7ea9ac99e171bb2b6e425e4b4af728f4783ab07c
commit 7ea9ac99e171bb2b6e425e4b4af728f4783ab07c
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-10-21 15:22:19 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-10-26 13:46:02 +0000
libc: Add a man page caveat about the `w` modifier
In-tree Clang is unaware of the N2680 fixed-width modifier `w` and emits
a warning when used.
PR: 299631
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D60939
lib/libc/stdio/printf.3 | 6 ++++++
1 file changed, 6 insertions(+)
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads