[PATCH 07/14] FreeBSD update of __dead2, etc.

Sebastian Huber sebastian.huber@embedded-brains.de
Fri Apr 19 09:29:00 GMT 2013


On 04/19/2013 11:18 AM, Corinna Vinschen wrote:
> On Apr 18 09:44, Sebastian Huber wrote:
>> On 04/18/2013 09:40 AM, Corinna Vinschen wrote:
>>> On Apr 17 15:16, Sebastian Huber wrote:
>>>> --- a/newlib/libc/include/sys/cdefs.h
>>>> +++ b/newlib/libc/include/sys/cdefs.h
>>>> @@ -147,6 +147,11 @@
>>>>   #endif /* __GNUC__ || __INTEL_COMPILER */
>>>>
>>>>   /*
>>>> + * Macro to test if we're using a specific version of gcc or later.
>>>> + */
>>>> +#define	__GNUC_PREREQ__(ma, mi)	__GNUC_PREREQ(ma, mi)
>>>> +
>>>> +/*
>>>
>>> Is it really necessary to introduce another version of the __GNUC_PREREQ
>>> macro?  And if we really do that, shouldn't it rather be defined in
>>> features.h, alongside the original macro?
>>
>> I introduced this define here to keep the differences between the
>> FreeBSD version as minimal as possible.
>>
>>  From the Newlib to FreeBSD difference we have:
>>
>> @@ -113,12 +143,7 @@
>>   /*
>>    * Macro to test if we're using a specific version of gcc or later.
>>    */
>> -#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
>> -#define	__GNUC_PREREQ__(ma, mi)	\
>> -	(__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))
>> -#else
>> -#define	__GNUC_PREREQ__(ma, mi)	0
>> -#endif
>> +#define	__GNUC_PREREQ__(ma, mi)	__GNUC_PREREQ(ma, mi)
>
> So you still have a difference, so what?  I think it's confusing to
> have the __GNUC_PREREQ__ in another file than the __GNUC_PREREQ
> definition, so I'd prefer to have it in features.h.  But I'm still
> not sure we really want two such definitions.

Yes, we have a difference since we define __GNUC_PREREQ__ in terms of 
__GNUC_PREREQ.  What is still the same is the place of the __GNUC_PREREQ__ in 
cdefs.h including the comment.

If we don't add __GNUC_PREREQ__, then I have to change every usage of 
__GNUC_PREREQ__ into __GNUC_PREREQ.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Newlib mailing list