Thread overview | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 17, 2005 regressions dmd-113 -> dmd-118 | ||||
---|---|---|---|---|
| ||||
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 XFAIL->ERROR http://dstress.kuehne.cn/nocompile/const_04.d XFAIL->XPASS http://dstress.kuehne.cn/nocompile/main_06.d FAIL->ERROR http://dstress.kuehne.cn/run/html_htm_02.HTM full listing: (1010K) http://dstress.kuehne.cn/www/results.html Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCOZdP3w+/yD4P9tIRAgUwAKClS9RDXk17KPioPLlctyK/TuZaBACfcReG 7XymsaxU1PdPmlIz2aHXDvc= =rG9a -----END PGP SIGNATURE----- |
March 17, 2005 Re: regressions dmd-113 -> dmd-118 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | Thomas Kuehne wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > XFAIL->ERROR > http://dstress.kuehne.cn/nocompile/const_04.d > > XFAIL->XPASS > http://dstress.kuehne.cn/nocompile/main_06.d That's a fix, not a regression. It's in the change log for 0.116, and AIUI in the spec a while before this. I've done an Excel file to show the trend in success/stability rates (hope you don't mind): http://smjg.port5.com/pr/d/dstress.xls Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit. |
March 17, 2005 Re: regressions dmd-113 -> dmd-118 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stewart Gordon schrieb am Thu, 17 Mar 2005 16:33:53 +0000: > Thomas Kuehne wrote: >> XFAIL->XPASS >> http://dstress.kuehne.cn/nocompile/main_06.d > That's a fix, not a regression. It's in the change log for 0.116, and AIUI in the spec a while before this. # int dummy(){printf("dummy\n");} # # void a(){ # return 0; # } # # void b(){ # return dummy(); # } The code for b is correct but a's code is illegal. http://digitalmars.com/d/statement.html # Expressions that have no effect, like (x + x), are illegal in expression # statements. > I've done an Excel file to show the trend in success/stability rates (hope you don't mind): > > http://smjg.port5.com/pr/d/dstress.xls Great! What is the meaning of the colors on the "Result" sheet? Is this an OpenOffice bug or is the 0.118 version label missing on the "DMD Trend" sheet? Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCObnH3w+/yD4P9tIRAkMKAJ0U7W4jMOAQ45iKQlcOhxQ9VUTq+ACeLgjg oyPVeaex2RYImyQTrHvCOYk= =VKpt -----END PGP SIGNATURE----- |
March 17, 2005 Re: regressions dmd-113 -> dmd-118 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | Thomas Kuehne wrote: > Stewart Gordon schrieb am Thu, 17 Mar 2005 16:33:53 +0000: > >> Thomas Kuehne wrote: > >>> XFAIL->XPASS http://dstress.kuehne.cn/nocompile/main_06.d > >> That's a fix, not a regression. It's in the change log for 0.116, >> and AIUI in the spec a while before this. > > # int dummy(){printf("dummy\n");} That shouldn't compile - it has no return statement. > # void a(){ # return 0; # } # # void b(){ # return dummy(); # } > > The code for b is correct but a's code is illegal. http://www.digitalmars.com/d/statement.html#return "Expression is allowed even if the function specifies a void return type. The Expression will be evaluated, but nothing will be returned." > http://digitalmars.com/d/statement.html # Expressions that have no > effect, like (x + x), are illegal in expression # statements. A return statement isn't an expression. But good question ... _should_ they be illegal as return statements as well? >> I've done an Excel file to show the trend in success/stability >> rates (hope you don't mind): >> >> http://smjg.port5.com/pr/d/dstress.xls > > Great! > > What is the meaning of the colors on the "Result" sheet? Red - worse than the immediately previous version Plum - worse than the best prior version This was done using the Conditional Formatting feature of Excel. Notice that a lot of the reds are where it hops between DMD and GDC versions. > Is this an OpenOffice bug or is the 0.118 version label missing on > the "DMD Trend" sheet? It looks fine to me. Must be a bug in OpenOffice or its Excel filter. Does OpenOffice show the labels inclined at 45° as they're supposed to be? And does it show all the 18 other version labels? Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit. |
March 17, 2005 Re: regressions dmd-113 -> dmd-118 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | In article <d1ches$1h10$1@digitaldaemon.com>, Stewart Gordon says... >http://www.digitalmars.com/d/statement.html#return > >"Expression is allowed even if the function specifies a void return type. The Expression will be evaluated, but nothing will be returned." What!? I thought that "feature" was removed long ago. Is there any reason why this is allowed? Seems useless and strange to me. Nick |
March 18, 2005 Re: regressions dmd-113 -> dmd-118 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | That's only true when warnings are enabled, isn't it?
-[Unknown]
> That shouldn't compile - it has no return statement.
|
March 18, 2005 Re: regressions dmd-113 -> dmd-118 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stewart Gordon schrieb am Thu, 17 Mar 2005 18:14:51 +0000: > Thomas Kuehne wrote: >> Stewart Gordon schrieb am Thu, 17 Mar 2005 16:33:53 +0000: >> >>> Thomas Kuehne wrote: >> >>>> XFAIL->XPASS http://dstress.kuehne.cn/nocompile/main_06.d >> >>> That's a fix, not a regression. It's in the change log for 0.116, and AIUI in the spec a while before this. >> >> # int dummy(){printf("dummy\n");} > > That shouldn't compile - it has no return statement. .... > >> # void a(){ # return 0; # } # # void b(){ # return dummy(); # } >> >> The code for b is correct but a's code is illegal. > > http://www.digitalmars.com/d/statement.html#return > > "Expression is allowed even if the function specifies a void return type. The Expression will be evaluated, but nothing will be returned." > >> http://digitalmars.com/d/statement.html # Expressions that have no effect, like (x + x), are illegal in expression # statements. > > A return statement isn't an expression. But good question ... _should_ they be illegal as return statements as well? "return;" and "return something();" are statements but the "something()" of "return something();" is an expression. >>> I've done an Excel file to show the trend in success/stability >>> rates (hope you don't mind): >>> >>> http://smjg.port5.com/pr/d/dstress.xls >> Is this an OpenOffice bug or is the 0.118 version label missing on the "DMD Trend" sheet? > > It looks fine to me. Must be a bug in OpenOffice or its Excel filter. Does OpenOffice show the labels inclined at 45° as they're supposed to be? And does it show all the 18 other version labels? Everything else is fine. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCOmvx3w+/yD4P9tIRAkiTAKDGdkVAUbY+AO7YwYwziUVFkREktACgszOu t6hZJchZgXlqzxGwd/AaEBM= =dq6c -----END PGP SIGNATURE----- |
March 18, 2005 Re: regressions dmd-113 -> dmd-118 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | Thomas Kuehne wrote: > Stewart Gordon schrieb am Thu, 17 Mar 2005 18:14:51 +0000: > >> Thomas Kuehne wrote: <snip> >>> http://digitalmars.com/d/statement.html >>> # Expressions that have no effect, like (x + x), are illegal in >>> # expression statements. >> >> A return statement isn't an expression. But good question ... _should_ they be illegal as return statements as well? > > "return;" and "return something();" are statements but > the "something()" of "return something();" is an expression. <snip> I meant to say: A return statement isn't an expression statement. ExpressionStatement: Expression ; ReturnStatement: return ; return Expression ; The paragraph you quoted from the spec is talking about the former. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit. |
March 18, 2005 Re: regressions dmd-113 -> dmd-118 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Unknown W. Brackets | Unknown W. Brackets wrote: > That's only true when warnings are enabled, isn't it? <snip top of upside-down reply> Every function with a non-void return type is required to have at least one return statement. The warnings simply tell you if not every path through the function has a return statement. For example, this is illegal int qwert(int yuiop) {} whereas this sparks a warning int qwert(int yuiop) { if (yuiop > 0) return yuiop; } and this would compile without warning or error int qwert(int yuiop) { if (yuiop > 0) return yuiop; return 0; } Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit. |
March 18, 2005 Re: regressions dmd-113 -> dmd-118 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stewart Gordon schrieb am Fri, 18 Mar 2005 10:47:51 +0000: > Thomas Kuehne wrote: >> Stewart Gordon schrieb am Thu, 17 Mar 2005 18:14:51 +0000: >> >>> Thomas Kuehne wrote: >>>> http://digitalmars.com/d/statement.html >>>> # Expressions that have no effect, like (x + x), are illegal in >>>> # expression statements. >>> >>> A return statement isn't an expression. But good question ... _should_ they be illegal as return statements as well? >> >> "return;" and "return something();" are statements but >> the "something()" of "return something();" is an expression. > I meant to say: > A return statement isn't an expression statement. For normal returns there is no problem with no-effect expressions, but for void-returns these expressions should be illegal. I'd rather opt for removing void-return than to start complicating the rules. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCOtbR3w+/yD4P9tIRAoFaAKDMEV+DK5TdrjIWsPXGNKkel3T4hwCfWEil sP2dZtre8wC0yqmW+MQ/zHk= =HYa8 -----END PGP SIGNATURE----- |
Copyright © 1999-2021 by the D Language Foundation