[Bug pending/64223] New: same warning repeated twice with same line number
jg at jguk dot org
gcc-bugzilla@gcc.gnu.org
Mon Dec 8 12:44:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64223
Bug ID: 64223
Summary: same warning repeated twice with same line number
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: pending
Assignee: unassigned at gcc dot gnu.org
Reporter: jg at jguk dot org
gcc (GCC) 4.8.3
Observation:
gcc C compilation outputs same warning twice. Same file and line number
Expectation:
The warning would only be reported once.
$ gcc -Wall -o strstr gcc_warn.c
gcc_warn.c: In function ‘main’:
gcc_warn.c:12:5: warning: format ‘%d’ expects argument of type ‘int’, but
argument 2 has type ‘off_t’ [-Wformat=]
printf("stat: %d\n", statbuf.st_size);
^
gcc_warn.c:12:5: warning: format ‘%d’ expects argument of type ‘int’, but
argument 2 has type ‘off_t’ [-Wformat=]
cat gcc_warn.c
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int main(void)
{
struct stat statbuf;
printf("stat: %d\n", statbuf.st_size);
return 0;
}
More information about the Gcc-bugs
mailing list