This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Ada] gnat_rm: main function return vs Set_Exit_Status doc is too implicit
- From: Georg Bauhaus <sb463ba at uni-duisburg dot de>
- To: gcc-bugs at gcc dot gnu dot org
- Cc: report at gnat dot com, lutz at iks-jena dot de
- Date: Wed, 29 May 2002 18:18:45 +0200 (MESZ)
- Subject: [Ada] gnat_rm: main function return vs Set_Exit_Status doc is too implicit
While *35* in "Implementation Defined Characteristics" of
gnat_rm.texi in GCC 3.1 states, for a main _function_, that
"the returned integer value is the return code of the program",
one can still use Set_Exit_Value in a main function and be
surprised that this won't have the desired effect (of setting
the effective exit value), because of a "return (Result)", not a
"return (gnat_exit_status)" from code generated by bindgen.adb.
Nothing wrong with that, but mightn't it be helpful to add half
a sentence to *35* to avoid possible confusion? (At least it
has been a confusion (resolved) in de.comp.lang.ada.)