[Bug c/32953] New: -Wformat warns incorrectly on an unterminated format string of length 1
[test]$ cat bar.c #include const char s[1] = "s"; int main (void) { printf (s); return 0; } [test]$ gcc-svn -v Using built-in specs. Target: i686-linux-gnu Configured with: ../gcc.orig/configure --prefix=/home/dsh --program-suffix=-svn --build=i686-linux-gnu --enable-languages=all Thread model: posix gcc version 4.3.0 20070731 (experimental) [test]$ gcc-svn -std=gnu99 -Wformat=2 bar.c bar.c: In function 'main': bar.c:6: warning: zero-length printf format string The format string is not zero-length, it's unterminated. The fix is simple. I've got a patch and will send it in shortly. -- Summary: -Wformat warns incorrectly on an unterminated format string of length 1 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dsh at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32953
[Bug c/32953] -Wformat warns incorrectly on an unterminated format string of length 1
--- Comment #1 from dsh at gcc dot gnu dot org 2007-08-13 21:55 --- Subject: Bug 32953 Author: dsh Date: Mon Aug 13 21:55:01 2007 New Revision: 127399 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127399 Log: gcc/ 2007-08-3 1 Dan Hipschman <[EMAIL PROTECTED]> PR 32953 * c-format.c (check_format_arg): Move check for zero-length format strings below the check for unterminated strings. testsuite/ 2007-08-13 Dan Hipschman <[EMAIL PROTECTED]> PR 32953 * gcc.dg/format/array-1.c: Add an additional test for unterminated format strings of length 1. Modified: trunk/gcc/ChangeLog trunk/gcc/c-format.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/format/array-1.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32953
[Bug c/32953] -Wformat warns incorrectly on an unterminated format string of length 1
--- Comment #2 from dsh at gcc dot gnu dot org 2007-08-13 22:09 --- Fixed. -- dsh at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32953
[Bug c/32528] -save-temps when compiling standard input fails
--- Comment #2 from dsh at gcc dot gnu dot org 2007-11-13 04:46 --- Created an attachment (id=14537) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14537&action=view) Idea for a fix I started on a patch for this a few months ago. It basically just prepended ./ to all the temporary file names. Attached. I doubt it will still apply right off the bat, but just take it as an idea for a fix. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32528
[Bug c/32528] -save-temps when compiling standard input fails
--- Comment #3 from dsh at gcc dot gnu dot org 2007-11-13 04:50 --- Created an attachment (id=14538) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14538&action=view) Better patch Sorry, this one's cleaner. That other one included some other cleanup that I think already went in. -- dsh at gcc dot gnu dot org changed: What|Removed |Added Attachment #14537|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32528
[Bug target/19923] [4.0/4.1/4.2/4.3 Regression] openssl is slower when compiled with gcc 4.0 than 3.3
--- Comment #42 from dsh at gcc dot gnu dot org 2007-11-28 17:19 --- Created an attachment (id=14656) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14656&action=view) Benchmarks I ran the benchmarks for the minimal testcase (using Dan Kegel's script) on a Core 2 Duo, AMD Dual Core Opteron, and a Pentium 3 using GCC 2.95.3, 3.4.3, 4.0.1, and 4.3.0 from svn. I'm still looking for a Pentium 4 to test on. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19923