This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13374] New: int main without return isn't a problem, why ?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]