This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g77 of egcs-1.0.2/1.0.3a returns exit code 1 for argument type mismatch
- To: sasaki at tyo dot sci dot jri dot co dot jp, egcs-bugs at cygnus dot com
- Subject: Re: g77 of egcs-1.0.2/1.0.3a returns exit code 1 for argument type mismatch
- From: Craig Burley <burley at gnu dot org>
- Date: Fri, 18 Sep 1998 13:19:01 -0400 (EDT)
- Cc: burley at gnu dot org
>>>>>> "Mako" == Mako Sasaki <sasaki@tyo.sci.jri.co.jp> writes:
>
> Mako> But the problem is that the compiler did not say any "fatal
> Mako> error" message, and, in more realistic case, such a coding
> Mako> style has been used intentinally;
>
>The compiler doesn't say `fatal error' at all as far as I know. If
>the error message in this situation isn't clear, or the part of the
>g77 manual to which it refers isn't clear, could you suggest how we
>could improve it? Thanks.
Note that egcs, gcc, and GNU command-line-driven programs in general
try to use a fairly standard format for issuing warnings and
fatal-error diagnostics. But they don't succeed in all cases, and,
strictly speaking, cannot, since some of the failure modes of a
large program (like egcs or gcc) include triggering operating-
system diagnostics that look quite different than the GNU messages.
However, on UNIX systems at least, a fairly universal way to determine
whether a command has produced a fatal error message is to examine
the exit code of the invocation:
gcc foo.f
echo $?
At least, this works in my shell -- if `0' gets printed, the command
ran fine, otherwise there was some sort of problem.
tq vm, (burley)