Placing variable/array in a particular section

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 3 19:57:18 PDT 2015


On 4/04/2015 3:08 a.m., Jens Bauer wrote:
> On Friday, 3 April 2015 at 13:58:21 UTC, Jens Bauer wrote:
>> On Friday, 3 April 2015 at 13:37:50 UTC, Rikki Cattermole wrote:
>>> On 4/04/2015 2:12 a.m., Jens Bauer wrote:
>>>> Is there a way of setting the target section for a variable or an
>>>> array ?
>>>
>>> Supposedly gdc supports it.
>>>
>>> [0] http://wiki.dlang.org/GDC/Using_GDC Extensions->Attributes
>>> [1]
>>> https://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html#Variable-Attributes
>>>
>>
>> I tried to use some of the examples, but I got the following error:
>>
>> src/start.d:7:10: error: module attribute is in file 'gcc/attribute.d'
>> which cannot be read
>>    import gcc.attribute;
>>           ^
>
> Uhm, it seems that druntime is required for that; unfortunately it's not
> ported to the Cortex-M platform.
> I found the attribute.d file and tried a quick copy-and-paste, but no
> luck there.

Yeah, contact the GDC guys, they should be able to help you.
Either the GDC newsgroup or as an issue on the compiler's project.

Atleast at this point, keep an open mind. Think of what you are doing as 
testing the current state :)


More information about the Digitalmars-d-learn mailing list