On Mar 13, 2012, at 12:48 PM, Richard Guenther wrote:

> On Tue, Mar 13, 2012 at 12:20 PM, Tristan Gingold <ging...@adacore.com> wrote:
>> 
>> On Mar 13, 2012, at 12:13 PM, Andreas Schwab wrote:
>> 
>>> Tristan Gingold <ging...@adacore.com> writes:
>>> 
>>>> diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
>>>> index 34183ba..120628e 100644
>>>> --- a/gcc/ada/gcc-interface/decl.c
>>>> +++ b/gcc/ada/gcc-interface/decl.c
>>>> @@ -5488,7 +5488,7 @@ gnat_to_gnu_param (Entity_Id gnat_param, 
>>>> Mechanism_Type mech,
>>>> 
>>>>   /* VMS descriptors are themselves passed by reference.  */
>>>>   if (mech == By_Short_Descriptor ||
>>>> -      (mech == By_Descriptor && TARGET_ABI_OPEN_VMS && !TARGET_MALLOC64))
>>>> +      (mech == By_Descriptor && TARGET_ABI_OPEN_VMS && 
>>>> !flag_vms_malloc64))
> 
> That looks ugly and should have left a target macro instead of ...
> 
>>> ../../gcc/ada/gcc-interface/decl.c: In function 'gnat_to_gnu_param':
>>> ../../gcc/ada/gcc-interface/decl.c:5492: error: 'flag_vms_malloc64' 
>>> undeclared (first use in this function)
>>> ../../gcc/ada/gcc-interface/decl.c:5492: error: (Each undeclared identifier 
>>> is reported only once
>>> ../../gcc/ada/gcc-interface/decl.c:5492: error: for each function it 
>>> appears in.)
>>> make[3]: *** [ada/decl.o] Error 1
>> 
>> For which target ?
>> 
>> On non-VMS targets, flag_vms_malloc64 is declared in gigi.h as:
>> 
>> /* Let code know whether we are targetting VMS without need of
>>   intrusive preprocessor directives.  */
>> #ifndef TARGET_ABI_OPEN_VMS
>> #define TARGET_ABI_OPEN_VMS 0
>> 
>> /* VMS option set by default, when clear forces 32bit mallocs and 32bit
>>   Descriptors. Always used in combination with TARGET_ABI_OPEN_VMS
>>   so no effect on non-VMS systems.  */
>> #define flag_vms_malloc64 0
>> #endif
> 
> ... this.

But even with a target macro, we should define it for targets other than VMS.

Tristan.

Reply via email to