www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

D.gnu - compiler does not complain no required return value

digitalmars.D.bugs/4837

Instead, the generated binary will abort at run-time and give misleading
message:


int f() {
return 0;  // gdc Error: AssertError Failure rtn.d(3); dmd Aborted
}

int main(char[][] args) {
f();
return 0;
}
Aug 26 2005
→ z gg.com writes:
int f() {
  // return 0;  // gdc Error: AssertError Failure rtn.d(3); dmd Aborted

need to comment out line 3 to see the error.
}

int main(char[][] args) {
f();
return 0;
}

Aug 26 2005
Stewart Gordon <smjg_1998 yahoo.com> writes:
z gg.com wrote:
 digitalmars.D.bugs/4837

Thank you for confessing your sin. http://smjg.port5.com/faqs/usenet/xpost.html Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- 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.
Aug 26 2005
Thank you for confessing your sin.

http://smjg.port5.com/faqs/usenet/xpost.html

(Yes, it is intentionally done! Thank you for mis-interpreting it.) I'm cross-posting to make sure that gdc guys know this is a common bug. Ideally, we have 2 compilers now, so we should have 3 bug lists: D.gdc.bugs D.dmd.bugs D.gdc-dmd-common.bugs
Aug 26 2005
↑ ↓ → Stewart Gordon <smjg_1998 yahoo.com> writes:
z gg.com wrote:
 Thank you for confessing your sin.

 http://smjg.port5.com/faqs/usenet/xpost.html

(Yes, it is intentionally done! Thank you for mis-interpreting it.) I'm cross-posting to make sure that gdc guys know this is a common bug.

If you'd followed the link above, you'd know that you haven't crossposted. You've multiposted. Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- 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.
Aug 31 2005