This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Improve readability in gcc.c (execute)
On 26 Nov, FX Coudert wrote:
> Hi,
>
> I'm not at all understanding what happens in that code, but unless I'm
> really tired (and in that case, I'm sorry for interfering), your patch
> is not a noop:
>
> if (WTERMSIG (status) == SIGPIPE
> && (signal_count || greatest_status >= MIN_FATAL_STATUS))
> ! {
> ! signal_count++;
> ! ret_code = -1;
> ! }
> else
> #endif
>
>
> In case the #if corresponding to the #endif we see here is not true,
> then "signal_count++; ret_code = -1;" will never be executed, while it
> was in the original code.
In the case that #ifdef is false "signal_count++; ret_code = -1;"
was never executed in the original code, since "fatal" unconditionally
calls exit. So this is really a noop.
Which proves my point that the readability of the code should be
improved ;-)
> FX
Regards,
Volker