This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/53946] New: gcc emits warning when intmax_t is long long and format string %jd is used
- From: "lxllol at yopmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 12 Jul 2012 23:37:21 +0000
- Subject: [Bug c/53946] New: gcc emits warning when intmax_t is long long and format string %jd is used
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53946
Bug #: 53946
Summary: gcc emits warning when intmax_t is long long and
format string %jd is used
Classification: Unclassified
Product: gcc
Version: 4.5.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: lxllol@yopmail.com
/* compile with -Wall -Werror */
typedef long long intmax_t;
#include <stdio.h>
int main() {
char x = 42;
printf("%jd\n", (intmax_t) x);
return 0;
}
$ gcc t.c -Wall -Werror
cc1: warnings being treated as errors
t.c: In function âmainâ:
t.c:7:2: error: format â%jdâ expects type âintmax_tâ, but argument 2 has type
âlong long intâ