D - [Segfaulting BUG] typedefing function pointers
- Lars Ivar Igesund (8/8) Feb 09 2004 The following code crash dmd with no error message:
- Lars Ivar Igesund (10/23) Feb 09 2004 Another one in a similar vein. The following code crash
- Sam McCall (4/16) Feb 09 2004 But isn't foo a variable not a type?
- Lars Ivar Igesund (3/21) Feb 10 2004 You're right of course. My fault. But it shouldn't segfault.
- Andy Friesen (9/20) Feb 09 2004 the expression 'int function() foo;' doesn't declare a type. It creates...
- Lars Ivar Igesund (3/31) Feb 10 2004 You're right of course. My fault. But it shouldn't segfault anyway.
The following code crash dmd with no error message: <-------------------- int function() foo; typedef foo bar; <-------------------- I suppose it isn't allowed to typedef function pointers, but still, an error message would be nice :) Lars Ivar Igesund
Feb 09 2004
Another one in a similar vein. The following code crash dmd with no error message: <---------------------- int function() foo; int bar(foo fp); <---------------------- I believe that function pointers as function parameters are allowed. Lars Ivar Igesund Lars Ivar Igesund wrote:The following code crash dmd with no error message: <-------------------- int function() foo; typedef foo bar; <-------------------- I suppose it isn't allowed to typedef function pointers, but still, an error message would be nice :) Lars Ivar Igesund
Feb 09 2004
Lars Ivar Igesund wrote:Another one in a similar vein. The following code crash dmd with no error message: <---------------------- int function() foo; int bar(foo fp); <---------------------- I believe that function pointers as function parameters are allowed.But isn't foo a variable not a type? Should error anyway. Sam
Feb 09 2004
Sam McCall wrote:Lars Ivar Igesund wrote:You're right of course. My fault. But it shouldn't segfault. Lars Ivar IgesundAnother one in a similar vein. The following code crash dmd with no error message: <---------------------- int function() foo; int bar(foo fp); <---------------------- I believe that function pointers as function parameters are allowed.But isn't foo a variable not a type? Should error anyway. Sam
Feb 10 2004
Lars Ivar Igesund wrote:The following code crash dmd with no error message: <-------------------- int function() foo; typedef foo bar; <-------------------- I suppose it isn't allowed to typedef function pointers, but still, an error message would be nice :)the expression 'int function() foo;' doesn't declare a type. It creates a global called foo, which is a pointer to a function that accepts no arguments, and returns an int. 'typedef foo bar;' on the next line is therefore complete nonsense. What you probably want is typedef int function() bar; Regardless, it shouldn't segfault the compiler. :) -- andy
Feb 09 2004
Andy Friesen wrote:Lars Ivar Igesund wrote:You're right of course. My fault. But it shouldn't segfault anyway. Lars Ivar IgesundThe following code crash dmd with no error message: <-------------------- int function() foo; typedef foo bar; <-------------------- I suppose it isn't allowed to typedef function pointers, but still, an error message would be nice :)the expression 'int function() foo;' doesn't declare a type. It creates a global called foo, which is a pointer to a function that accepts no arguments, and returns an int. 'typedef foo bar;' on the next line is therefore complete nonsense. What you probably want is typedef int function() bar; Regardless, it shouldn't segfault the compiler. :) -- andy
Feb 10 2004