digitalmars.D.bugs - dmd 125 bug? compiles and seg faults...
- clayasaurus (27/27) May 23 2005 is seg faulting the desired behavior of this code?
- Andrew Fedoniouk (6/6) May 23 2005 Yours:
- Walter (5/27) May 23 2005 Replacing the ':' with a '.' and it exhibits the behavior you're looking
- Roberto Mariottini (4/10) May 24 2005 Time for an Obfuscated D contest! ;-)
- Walter (3/4) May 24 2005 Ouch!
- David Medlock (3/21) May 24 2005 As suspected, goto (and its labels) are the root of all evil!
- Walter (13/26) May 25 2005 Long ago, the C'ith Lord mastered the dark secrets of the goto and the
- Andrew Fedoniouk (1/1) May 25 2005 :)
- John Reimer (4/19) May 25 2005 That was funny!
- Unknown W. Brackets (2/15) May 25 2005
-
Dave
(2/29)
May 27 2005
LOL. This one is destined for my archive drive
is seg faulting the desired behavior of this code? ------------------------------------------------------------------- import std.stdio; int main() { Two thy = new Two; thy.print(); return 0; } class One { void print() { writefln("Hello"); } } class Two : One { void print() { One:print(); writefln("There"); } } ------------------------------------------------------------------- I wrote this while trying to rediscover inheritance. Anyway, I found super.print() works.
May 23 2005
Yours: void print() { print(); } will produce "Stack overflow".
May 23 2005
"clayasaurus" <clayasaurus gmail.com> wrote in message news:d6tven$2g4r$1 digitaldaemon.com...import std.stdio; int main() { Two thy = new Two; thy.print(); return 0; } class One { void print() { writefln("Hello"); } } class Two : One { void print() { One:print();Replacing the ':' with a '.' and it exhibits the behavior you're looking for. The One:print(); is parsed as One being a label, then the print() recursively calls itself till the stack overflows.writefln("There"); } }
May 23 2005
In article <d6uir1$30uc$1 digitaldaemon.com>, Walter says...[...]Time for an Obfuscated D contest! ;-) Ciaovoid print() { One:print();Replacing the ':' with a '.' and it exhibits the behavior you're looking for. The One:print(); is parsed as One being a label, then the print() recursively calls itself till the stack overflows.
May 24 2005
"Roberto Mariottini" <Roberto_member pathlink.com> wrote in message news:d6ujrt$s0$1 digitaldaemon.com...Time for an Obfuscated D contest! ;-)Ouch!
May 24 2005
Roberto Mariottini wrote:In article <d6uir1$30uc$1 digitaldaemon.com>, Walter says... [...]As suspected, goto (and its labels) are the root of all evil! -DavidMTime for an Obfuscated D contest! ;-) Ciaovoid print() { One:print();Replacing the ':' with a '.' and it exhibits the behavior you're looking for. The One:print(); is parsed as One being a label, then the print() recursively calls itself till the stack overflows.
May 24 2005
"David Medlock" <noone nowhere.com> wrote in message news:d70at4$2hvq$1 digitaldaemon.com...Roberto Mariottini wrote:Long ago, the C'ith Lord mastered the dark secrets of the goto and the pointer to gain unprecedented levels of power, using it to betray and slaughter the Javi Knights. A dark age of buffer overflows and gp faults ensued, and many systems were ravaged by virus attacks. But from the fatal loins of the C'ith Lord spawned a new hope, Duke Arraywalker, with power greater than even the C'ith could imagine. But Duke is young and unproven. Will he apprentice with the exiled Javi? Will he learn the unix ways of the Source? Will he prevail in the coming battle with the C'ith Lord? Or will he be seduced by the dark side of the goto and the pointer? Stay tuned!In article <d6uir1$30uc$1 digitaldaemon.com>, Walter says...As suspected, goto (and its labels) are the root of all evil!Time for an Obfuscated D contest! ;-)void print() { One:print();Replacing the ':' with a '.' and it exhibits the behavior you're looking for. The One:print(); is parsed as One being a label, then the print() recursively calls itself till the stack overflows.
May 25 2005
Walter wrote:Long ago, the C'ith Lord mastered the dark secrets of the goto and the pointer to gain unprecedented levels of power, using it to betray and slaughter the Javi Knights. A dark age of buffer overflows and gp faults ensued, and many systems were ravaged by virus attacks. But from the fatal loins of the C'ith Lord spawned a new hope, Duke Arraywalker, with power greater than even the C'ith could imagine. But Duke is young and unproven. Will he apprentice with the exiled Javi? Will he learn the unix ways of the Source? Will he prevail in the coming battle with the C'ith Lord? Or will he be seduced by the dark side of the goto and the pointer? Stay tuned!That was funny! And to think compiler writing became your chosen profession... ;-) -JJR
May 25 2005
LOL. -[Unknown]Long ago, the C'ith Lord mastered the dark secrets of the goto and the pointer to gain unprecedented levels of power, using it to betray and slaughter the Javi Knights. A dark age of buffer overflows and gp faults ensued, and many systems were ravaged by virus attacks. But from the fatal loins of the C'ith Lord spawned a new hope, Duke Arraywalker, with power greater than even the C'ith could imagine. But Duke is young and unproven. Will he apprentice with the exiled Javi? Will he learn the unix ways of the Source? Will he prevail in the coming battle with the C'ith Lord? Or will he be seduced by the dark side of the goto and the pointer? Stay tuned!
May 25 2005
In article <d7287c$30af$1 digitaldaemon.com>, Walter says..."David Medlock" <noone nowhere.com> wrote in message news:d70at4$2hvq$1 digitaldaemon.com...LOL. This one is destined for my archive drive <g>Roberto Mariottini wrote:Long ago, the C'ith Lord mastered the dark secrets of the goto and the pointer to gain unprecedented levels of power, using it to betray and slaughter the Javi Knights. A dark age of buffer overflows and gp faults ensued, and many systems were ravaged by virus attacks. But from the fatal loins of the C'ith Lord spawned a new hope, Duke Arraywalker, with power greater than even the C'ith could imagine. But Duke is young and unproven. Will he apprentice with the exiled Javi? Will he learn the unix ways of the Source? Will he prevail in the coming battle with the C'ith Lord? Or will he be seduced by the dark side of the goto and the pointer? Stay tuned!In article <d6uir1$30uc$1 digitaldaemon.com>, Walter says...As suspected, goto (and its labels) are the root of all evil!Time for an Obfuscated D contest! ;-)void print() { One:print();Replacing the ':' with a '.' and it exhibits the behavior you're looking for. The One:print(); is parsed as One being a label, then the print() recursively calls itself till the stack overflows.
May 27 2005