tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: alloca again



>> #if defined(_NETBSD_SOURCE)
>> #if defined(alloca) && (alloca == __builtin_alloca) && \

> According to my knowledge of the C preprocessor, the condition
> 'alloca == __builtin_alloca' always evaluates to '0 == 0', assuming
> that if 'alloca' and '__builtin_alloca' are actually defined, they
> expand to some other identifier.

Yes and no.  At least, as of the latest spec I've got (which admittedly
is a very late C99 draft, not the standard itself).

_NETBSD_SOURCE and __builtin_alloca are each in reserved-for-any-use
namespace, so there are no grounds for citing the standard as basis for
any behaviour whatsoever from that.

Ignoring that issue - if, say, they were NETBSD_SOURCE and
builtin_alloca instead - then I believe you are correct.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index