Mail Archives: djgpp/1999/05/25/04:08:06
On Mon, 24 May 1999, Guillermo Rodriguez Garcia wrote:
> "A return statement in main has the effect of leaving the main
> function (destroying any objects with automatic storage duration) and
> calling exit with the return value as the argument. If control reaches
> the end of main without encountering a return statement, the effect is
> that of executing:
>
> return 0;"
>
> I suggest to correct this for the next version of DJGPP.
This is not a DJGPP matter, it is a C++ library matter. DJGPP only
supplies a C library, and for that the rules of C89 or C9x are the
defining standards. If C++ requires a different handling of the exit
status, the necessary code should already be in the C++ library
shut-down procedure. Otherwise the C++ library violates the C++
standard, and you should report that as a bug to the GNU C++ library
maintainer(s).
The C++ library supplied with DJGPP is simply a port of the GNU C++
library, like other ports in v2gnu directory. It is not developed
as part of DJGPP, and therefore any genuine bugs should be reported
elsewhere.
- Raw text -