Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
December 15, 2005 .mangeof make assertion error for typedefs | ||||
---|---|---|---|---|
| ||||
import std.stdio; typedef int ti; int main( char[][] arg ) { writefln( "ti=%s", ti.mangleof ); } $ build mangle.d gcc mangle.o -o mangle -lphobos -lpthread -lm $ ./mangle ti=i Error: AssertError Failure mangle(8) $ Especially interesting is, that if I do a writefln after the first, it is outputed: writefln( "ti=%s", ti.mangleof ); writefln( "i=%s", int.mangleof ); -> ti=i i=i Error: AssertError Failure mangle(10) Frank |
December 15, 2005 Re: .mangeof make assertion error for typedefs | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit | This happens also with this: import std.stdio; class A{} int main( char[][] arg ) { writefln( "name=%s", A.mangleof ); } |
December 15, 2005 Re: .mangeof make assertion error for typedefs | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit | On Thu, 15 Dec 2005 22:59:25 +0100 Frank Benoit wrote:
> This happens also with this:
>
> import std.stdio;
> class A{}
> int main( char[][] arg ) {
> writefln( "name=%s", A.mangleof );
> }
I think you need to return an int from main().
Haven't tested ...
HTH,
Rick
|
December 16, 2005 Re: .mangeof make assertion error for typedefs | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rick Noether | Rick Noether wrote: > On Thu, 15 Dec 2005 22:59:25 +0100 Frank Benoit wrote: > >> This happens also with this: >> >> import std.stdio; >> class A{} >> int main( char[][] arg ) { >> writefln( "name=%s", A.mangleof ); >> } > > I think you need to return an int from main(). > Haven't tested ... Yes. That old DMD bug that's been reported many times. http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/3669 http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/4124 http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/28449 Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit. |
December 16, 2005 Re: .mangeof make assertion error for typedefs | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | Stewart Gordon wrote: > Rick Noether wrote: > >> On Thu, 15 Dec 2005 22:59:25 +0100 Frank Benoit wrote: >> >>> This happens also with this: >>> >>> import std.stdio; >>> class A{} >>> int main( char[][] arg ) { >>> writefln( "name=%s", A.mangleof ); >>> } >> >> >> I think you need to return an int from main(). >> Haven't tested ... > > > Yes. That old DMD bug that's been reported many times. > > http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/3669 > http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/4124 > http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/28449 > > Stewart. > I've triped on it too. http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/5281 -- Bruno Medeiros - CS/E student "Certain aspects of D are a pathway to many abilities some consider to be... unnatural." |
Copyright © 1999-2021 by the D Language Foundation