<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 --- - Clang errors out on OpenBSD's bounded attribute"
   href="http://llvm.org/bugs/show_bug.cgi?id=18075">18075</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang errors out on OpenBSD's bounded attribute
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>OpenBSD
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>brad@comstyle.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>As mentioned in OpenBSD's gcc-local(1)..

     -   gcc recognizes a new flag, -Wbounded, to perform basic checks on
         functions which accept buffers and sizes.  An extra attribute,
         __bounded__, has been added to mark functions that can be checked
         this way.

Clang does not support the bounded attribute yet; eventually someone will
probably submit support for it, but with trunk and what will be 3.4 Clang no
longer ignores the attribute unlike 3.3 and now errors out. This leaves
Clang/LLVM in an unusable state on OpenBSD as is.

clang -fno-color-diagnostics -O2 -pipe  -fno-pie   -DINET6 -c cmds.c
In file included from cmds.c:67:
In file included from /usr/include/sys/types.h:224:
In file included from /usr/include/sys/select.h:37:
In file included from /usr/include/sys/time.h:329:
/usr/include/time.h:135:31: error: use of undeclared identifier '__string__'
                __attribute__ ((__bounded__(__string__,1,2)));
                                            ^
/usr/include/time.h:145:31: error: use of undeclared identifier '__minbytes__'
                __attribute__ ((__bounded__(__minbytes__,2,26)));
                                            ^
/usr/include/time.h:147:31: error: use of undeclared identifier '__minbytes__'
                __attribute__ ((__bounded__(__minbytes__,2,26)));</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>