public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13374] New: int main without return isn't a problem, why ?
@ 2003-12-10 11:04 tim dot coninx at pandora dot be
  2003-12-10 11:27 ` [Bug c++/13374] " paolo at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tim dot coninx at pandora dot be @ 2003-12-10 11:04 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/13374] int main without return isn't a problem, why ?
  2003-12-10 11:04 [Bug c++/13374] New: int main without return isn't a problem, why ? tim dot coninx at pandora dot be
@ 2003-12-10 11:27 ` paolo at gcc dot gnu dot org
  2003-12-10 11:31 ` paolo at gcc dot gnu dot org
  2003-12-10 15:40 ` gdr at integrable-solutions dot net
  2 siblings, 0 replies; 4+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-12-10 11:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From paolo at gcc dot gnu dot org  2003-12-10 11:27 -------
Definitely a C++ feature, C needs the return, tough.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13374


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/13374] int main without return isn't a problem, why ?
  2003-12-10 11:04 [Bug c++/13374] New: int main without return isn't a problem, why ? tim dot coninx at pandora dot be
  2003-12-10 11:27 ` [Bug c++/13374] " paolo at gcc dot gnu dot org
@ 2003-12-10 11:31 ` paolo at gcc dot gnu dot org
  2003-12-10 15:40 ` gdr at integrable-solutions dot net
  2 siblings, 0 replies; 4+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-12-10 11:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From paolo at gcc dot gnu dot org  2003-12-10 11:31 -------
By the way, if you are curious, this is 3.6.1, p5 of the C++ standard.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13374


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/13374] int main without return isn't a problem, why ?
  2003-12-10 11:04 [Bug c++/13374] New: int main without return isn't a problem, why ? tim dot coninx at pandora dot be
  2003-12-10 11:27 ` [Bug c++/13374] " paolo at gcc dot gnu dot org
  2003-12-10 11:31 ` paolo at gcc dot gnu dot org
@ 2003-12-10 15:40 ` gdr at integrable-solutions dot net
  2 siblings, 0 replies; 4+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-12-10 15:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2003-12-10 15:40 -------
Subject: Re:  int main without return isn't a problem, why ?

"paolo at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| Definitely a C++ feature, C needs the return, tough.

Only C90 actually.  C99 followed C++.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13374


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-10 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-10 11:04 [Bug c++/13374] New: int main without return isn't a problem, why ? tim dot coninx at pandora dot be
2003-12-10 11:27 ` [Bug c++/13374] " paolo at gcc dot gnu dot org
2003-12-10 11:31 ` paolo at gcc dot gnu dot org
2003-12-10 15:40 ` gdr at integrable-solutions dot net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).