summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/asprintf.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-08-27 10:05:08 +0000
committerobrien <obrien@FreeBSD.org>1999-08-27 10:05:08 +0000
commite7996da3faa8f5f011336f6bf45f220d36c1c50e (patch)
treeb7e9b4ef1abb87b3558f260ab7eef264b9b68e27 /lib/libc/stdio/asprintf.c
parenta774007e84fd58a2abdd7a9d186f05144e2abe24 (diff)
downloadFreeBSD-src-e7996da3faa8f5f011336f6bf45f220d36c1c50e.zip
FreeBSD-src-e7996da3faa8f5f011336f6bf45f220d36c1c50e.tar.gz
Don't accept %q length specifiers in the kernel (more precisely,
if compiling with -fformat-extensions). Gcc's format checker never actually supported %q length specifiers. It treats %q as an alias for %ll, which is correct if quad_t is long long (e.g., on i386's) and broken otherwise (e.g., on alphas). quad_t's currently should be printed in the same way that they already need to be printed to avoid compiler warnings on all supported systems: cast them to a standard type that is at least as large (long or long long) and use the length specifier for that (%l or %ll). This is problematic since long long isn't standard yet. C9x's intmax_t should be implemented soon. Don't accept %L length specifiers in the kernel either. The only legitimate ones are for long doubles, but the kernel doesn't even support plain doubles. (gcc bogusly accepts %Ld as an alias for %lld, and it sometimes prints "q" in error messages about "ll" and "L" length specifiers, becauses it represents all these specifiers as 'q'.) Submitted by: bde
Diffstat (limited to 'lib/libc/stdio/asprintf.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud