http://llvm.org/bugs/show_bug.cgi?id=18075

            Bug ID: 18075
           Summary: Clang errors out on OpenBSD's bounded attribute
           Product: clang
           Version: trunk
          Hardware: All
                OS: OpenBSD
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

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)));

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to