HEADS DOWN

Bruce Evans bde at zeta.org.au
Sun May 13 11:42:21 UTC 2007


On Sat, 12 May 2007, Sean C. Farley wrote:

> On Sat, 12 May 2007, Alexander Leidinger wrote:
>
>> Quoting "Sean C. Farley" <sean-freebsd at farley.org> (from Fri, 11 May 2007 
>> 18:21:09 -0500 (CDT)):
>> 
>>> It seems that __attribute__((pure)) is not supported by the Intel
>>> compiler.  Would my strlen() be of any use when libc is compiled with
>>> it?
>> 
>> That's one reason we have cdefs.h, so you can use appropriate macros
>> instead of using __attribute__((foo)) directly.
>
> Actually, what I meant was that strlen() has the pure attribute via
> __pure, and cdefs.h shows that the Intel compiler is not able to make
> use of it.

cdefs.h really shouldn't have __pure.  __pure was __pure2 in
FreeBSD-1/gcc-1.  __pure2 exists because the the syntax for it is
incompatible with the syntax for the FreeBSD-1 __pure, not because it
is purer than gcc's pure = the FreeBSD_current __pure.  The syntax is
incompatible because gcc-1 didn't have __attribute__(()).  gcc-1 and
most of gcc-2 also didn't have `pure' to cause confusion with FreeBSD's
__pure*.

Bruce


More information about the freebsd-arch mailing list