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]

[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.)


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