DIP62: Volatile type qualifier for unoptimizable variables in embedded programming

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 17 13:42:07 PDT 2014


On 17 July 2014 21:01, Johannes Pfau via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> Am Thu, 17 Jul 2014 08:05:33 +0100
> schrieb Iain Buclaw via Digitalmars-d <digitalmars-d at puremagic.com>:
>
>> On 17 July 2014 07:09, Walter Bright via Digitalmars-d
>> <digitalmars-d at puremagic.com> wrote:
>> > On 7/16/2014 1:12 PM, Johannes Pfau wrote:
>> >>
>> >> I'll take this as you pre-approve all the mentioned extensions?
>> >>
>> >> * way to disable typeinfo for struct
>> >
>> >
>> > Worth investigating. It'd probably be much more effective to work
>> > the linker angle of removing items for which no references exist.
>> > Martin was working on that, but his latest attempt had to be
>> > reverted, as it needed a new approach.
>> >
>> >
>> >
>> >> * way to disable initializer
>> >
>> >
>> > T t = void; // no initialization
> I'm referring to the __initZ symbol/data, it gets emitted even if all
> fields of a struct are =void initialized.
>
>> >
>> >
>> >> * force inlining
>> >
>> >
>> > http://wiki.dlang.org/DIP56 (Note the author!)
>> >
>>
>> For the time being, GDC has @attribute("forceinline")
>>
>> https://github.com/D-Programming-GDC/GDC/blob/master/libphobos/libdruntime/gcc/attribute.d
>>
>
> Yes. We'll have to take a look if we can prevent the function from
> appearing in the object file (with force inline, there's no need to
> keep the function, it must always be inlined anyway)
>

Just mark them as extern.  More important, we need a way to build the
bodies of functions in other modules for cross-module inlining (needed
for @forceinline to work correctly without getting 'function body is
not available' errors).


More information about the Digitalmars-d mailing list