This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13374] New: int main without return isn't a problem, why ?
- From: "tim dot coninx at pandora dot be" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Dec 2003 11:04:02 -0000
- Subject: [Bug c++/13374] New: int main without return isn't a problem, why ?
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I'm sorry if this is common knowledge, but I can't seem to find the correct
answer anywhere.
the following trivial code
---
#include <iostream>
using namespace std;
int main() {
cout << "bla" << endl;
}
---
doesn't issue a error or even a warning, even though there is no return (save
the implicit 0 returnvalue)
Is this a bug or a feature ?
--
Summary: int main without return isn't a problem, why ?
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tim dot coninx at pandora dot be
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: lnx
GCC host triplet: lnx
GCC target triplet: lnx
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13374