This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: C99 assert
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jeff Johnston on 6/26/2007 2:27 PM:
> Eric Blake wrote:
>> Jeff Johnston <jjohnstn <at> redhat.com> writes:
>>
>>> Hi Eric,
>>>
>>> I'd like to see backward-compatiblity to be the old-style message
>>> format. I don't see the point of saying: function <blank>. So, old
>>> compiled calls to __assert would behave as they always have.
>>> Similarly, for systems without function capability, I would like to
>>> use the old message format. My take would be to have both __assert
>>> and __assert_func and have assert map to the appropriate call. I
>>> also think that the function should be quoted or you should use a
>>> colon (e.g. function: getparms) for clarification.
>>>
>>
>> How about the following, then?
>>
>
> Looks good, thanks. Assuming you have done some preliminary testing on
> it, feel free to check it in.
Applied after testing with cygwin. I ended up altering the header a bit
more from the earlier post (using __e instead of e as the macro parameter,
only defining __ASSERT_FUNC if it was not already defined, and
reorganizing the check for __func__ to behave correctly even when
__STDC_VERSION__ is not defined, as was the case on cygwin).
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGgl2Q84KuGfSFAYARAgUUAJ9YlBt/EySO/SIQ4QN8iigyZ0uTOQCdHRRj
Qd0j80OLEWA+BtRto6SuzyY=
=MyIJ
-----END PGP SIGNATURE-----