Assigning function pointers is not type-checked:

import std.stdio;

alias void function(byte a) foo_t;
void foo(int x) { writeln(x); }
foo_t foo_p = &foo;

void main(string[] args)
{
    foo_p(42);
}

The code compiles and the program outputs -1075219670. Is it a known
regression? Very severe bug, in my opinion.

On Fri, May 13, 2011 at 12:14 AM, Walter Bright <[email protected]>wrote:

>
>
> On 5/12/2011 1:20 PM, Michel Fortin wrote:
>
>>
>> $ dmd test.d
>> ld: warning: directory not found for option
>> '-L/Library/Compilers/dmd2/osx/bin/../lib32'
>>
>> Compilation worked for me, but only because I have a libphobos2.a symlink
>> in /usr/local/lib. Looks like osx/bin/dmd.conf wrongly points to osx/lib32
>> instead of the renamed osx/lib.
>>
>>
> Fixed.
>
> _______________________________________________
> dmd-beta mailing list
> [email protected]
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to