Bug 15125 - [3.3/3.4/4.0 regression] g++ -Wformat doesn't warn for different types in fprintf
Summary: [3.3/3.4/4.0 regression] g++ -Wformat doesn't warn for different types in fpr...
Status: RESOLVED DUPLICATE of bug 14791
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.3.4
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2004-04-25 09:01 UTC by Debian GCC Maintainers
Modified: 2004-10-07 23:42 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 3.2.3
Known to fail: 3.4.0 4.0.0 3.3.3 3.3.1
Last reconfirmed: 2004-04-25 13:35:39


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2004-04-25 09:01:47 UTC
[forwarded from http://bugs.debian.org/243507]

regression from 3.2

#include <stdio.h>

int main()
{
  fprintf(stdout, "%f\n", 0);
  fprintf(stdout, "%f\n", 0.0);
  return 0;
}
$ gcc -Wall -W test.c
test.c: In function `main':
test.c:5: warning: double format, different type arg (arg 3)

$ g++ -Wall -W test.c
$
Comment 1 Andrew Pinski 2004-04-25 13:35:39 UTC
Confirmed.
Comment 2 Giovanni Bajo 2004-04-25 15:31:52 UTC

*** This bug has been marked as a duplicate of 14791 ***