<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - -pedantic turns on -Wformat-non-iso even though positional arguments are part of POSIX.1 2008"
   href="http://llvm.org/bugs/show_bug.cgi?id=20356">20356</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-pedantic turns on -Wformat-non-iso even though positional arguments are part of POSIX.1 2008
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>fuzxxl@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Compile the following example program with -std=c99 -pedantic:

    #define _POSIX_C_SOURCE 200809L
    #include <stdio.h>

    extern int
    main(void)
    {
        printf("%2$*1$d\n", 10, 4223);
        return (0);
    }

clang will warn that positional arguments are not in ISO C. Although
technically correct, this warning is not useful as positional arguments are
part of POSIX.1 2008, compliancy with which I explicitly request using a
feature test macro. This renders the -pedantic flag much less useful to develop
(POSIX) portable applications as it generates warnings about features that are
available on conforming platforms.

It might make sense to define an extra warning flag -pedantic=posix which is
pedantic about stuff that is neither in ISO C nor POSIX.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>