[Bug 1317305] Re: -Wno-format is not honored

Launchpad Bug Tracker 1317305 at bugs.launchpad.net
Sun Jun 1 09:49:27 UTC 2014


This bug was fixed in the package gcc-4.9 - 4.9.0-5ubuntu2

---------------
gcc-4.9 (4.9.0-5ubuntu2) utopic; urgency=medium

  * Update to SVN 20140530 (r211080) from the gcc-4_9-branch.
  * Fix -Wno-format when -Wformat-security is the default (Steve Beattie).
    LP: #1317305.
 -- Matthias Klose <doko at ubuntu.com>   Fri, 30 May 2014 16:10:11 +0200

** Changed in: gcc-4.9 (Ubuntu)
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-4.8 in Ubuntu.
https://bugs.launchpad.net/bugs/1317305

Title:
  -Wno-format is not honored

Status in “gcc-4.8” package in Ubuntu:
  Fix Released
Status in “gcc-4.9” package in Ubuntu:
  Fix Released

Bug description:
  Due to the way the gcc-default-format-security patch is implemented in
  gcc-4.8, disabling format warnings does not work:

    $ cat format-extra-args.c
    #include <stdio.h>

    /* printf extra arguments example */
    int main(void)
    {
          printf("%s\n", "argument 1", "argument 2");

          return 0;
    }
    $ gcc -Wall -O2 -o format-off format-extra-args.c -Wno-format
    format-extra-args.c: In function 'main':
    format-extra-args.c:12:2: warning: too many arguments for format [-Wformat-extra-args]
      printf("%s\n", "argument 1", "argument 2");
      ^

  Earlier versions of gcc allowed disabling warnings correctly.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1317305/+subscriptions



More information about the foundations-bugs mailing list