digitalmars.D.bugs - 0.146 -run bug
- Dawid =?UTF-8?B?Q2nEmcW8YXJraWV3aWN6?= (15/15) Feb 10 2006 No return statment:
- nascent (6/33) Feb 10 2006 int main() {
- Dawid =?UTF-8?B?Q2nEmcW8YXJraWV3aWN6?= (7/17) Feb 10 2006 Sorry, but I don't understand what are you trying to say. :)
- Derek Parnell (7/22) Feb 10 2006 Try compiling with "-w" switch.
- Regan Heath (22/41) Feb 10 2006 It's the compiler that should be more verbose :)
No return statment: $ cat a.d import std.stdio; int main() { writef("i kupa\n"); } $ dmd a.d -run i kupa Error: AssertError Failure a(5) Is this bug? oh, and: $ dmd -run a.d suppose ... Anyway - neat stuff. Time to rewrite some of my daily used scripts. :>
Feb 10 2006
int main() { writef("i kupa\n"); }int main() { writef("i kupa\n"); return 0; } left out the return. I've done that. Dawid Ciężarkiewicz wrote:No return statment: $ cat a.d import std.stdio; int main() { writef("i kupa\n"); } $ dmd a.d -run i kupa Error: AssertError Failure a(5) Is this bug? oh, and: $ dmd -run a.d suppose ... Anyway - neat stuff. Time to rewrite some of my daily used scripts. :>
Feb 10 2006
nascent wrote:> int main() { > writef("i kupa\n"); > } int main() { writef("i kupa\n"); return 0; } left out the return. I've done that.Sorry, but I don't understand what are you trying to say. :) I know that I've got no return statement, but IMO assert(...) is not right way to communicate that. They are many posts of new users with "DMD's warnings/errors are cryptic" and they are always "where?" replies. "Here". Sorry if I missunderstood your intentions (please be more verbose in such circumstance).
Feb 10 2006
On Sat, 11 Feb 2006 10:10:26 +1100, Dawid Ciężarkiewicz <dawid.ciezarkiewicz gmail.com> wrote:nascent wrote:Try compiling with "-w" switch. "warning - test.d(2): function test.main no return at end of function" -- Derek Parnell Melbourne, Australia> int main() { > writef("i kupa\n"); > } int main() { writef("i kupa\n"); return 0; } left out the return. I've done that.Sorry, but I don't understand what are you trying to say. :) I know that I've got no return statement, but IMO assert(...) is not right way to communicate that.
Feb 10 2006
On Sat, 11 Feb 2006 00:10:26 +0100, Dawid Ciężarkiewicz <dawid.ciezarkiewicz gmail.com> wrote:nascent wrote:It's the compiler that should be more verbose :) Is there a technical difficulty to adding a custom string? Or some reason why a string wouldn't be desirable i.e. performance? binary size/complexity? This ties in with previous requests for custom strings on asserts, is it that there is a problem with doing it, or is it just a low priority feature? The argument against them in the past has been that an assert is a debug tool and if you get one you simply look in the source for the cause of the assert and as such no custom string is required. I think there is some sound reasoning there but I think that the fact that this assert is not visible in the code makes it a good cadidate for a custom string and I suspect that once it was added user defined custom strings for user defined asserts would become a trivial feature to add. I also imagine sending a customer a debug build in order to replicate a fault and debug it, in such a case an assert that could output the data it was asserting on, i.e. assert(i < 10,"i(%d) >= 10",i); would be a valuable debugging tool, no? Regan> int main() { > writef("i kupa\n"); > } int main() { writef("i kupa\n"); return 0; } left out the return. I've done that.Sorry, but I don't understand what are you trying to say. :) I know that I've got no return statement, but IMO assert(...) is not right way to communicate that. They are many posts of new users with "DMD's warnings/errors are cryptic" and they are always "where?" replies. "Here". Sorry if I missunderstood your intentions (please be more verbose in such circumstance).
Feb 10 2006