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: [email protected]
ReportedBy: [email protected]
/* 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’