https://gcc.gnu.org/ml/gcc-patches/2017-10/msg02337.html
sorry for dropping this one.
looks good, except:
- for (; argno != argc; argno++)
+ if (flag_intermediate_format)
{
- if (flag_display_progress)
- printf ("Processing file %d out of %d\n", argno - first_arg + 1,
- argc - first_arg);
- process_file (argv[argno]);
+ for (; argno != argc; argno++)
+ {
+ if (flag_display_progress)
+ printf ("Processing file %d out of %d\n", argno - first_arg + 1,
+ argc - first_arg);
+ process_file (argv[argno]);
+ generate_results (argv[argno]);
+ release_structures ();
+ }
}
+ else
+ {
+ for (; argno != argc; argno++)
+ {
+ if (flag_display_progress)
+ printf ("Processing file %d out of %d\n", argno - first_arg + 1,
+ argc - first_arg);
+ process_file (argv[argno]);
+ }
looks like a manually unswitched loop. Isn't
for (... )
{
if (...)
printf ...
process_file (...)
if (flag_intermediate_files)
{
generate_results (...);
release_structures ();
}
}
clearer?
--
Nathan Sidwell