Now that Jason Merrill has soft-approved https://gcc.gnu.org/pipermail/gcc-patches/2025-August/693141.html, I am rebasing this series on top of that (they were touching the same code).
Note that I think the first two are good refactor regardless of whether we want this new feature or not, so it makes some sense to separately consider 1 & 2 as a single unit, and then 3 & 4 as a single unit. John On Wed, Aug 6, 2025, at 5:44 PM, John Ericson wrote: > Now that `find_a_program` and `find_a_file` have been separated, we > don't need a mode parameter, because one is always doing `R_OK`, and the > other is always doing `X_OK`. > > This change also proves that some of the code I removed from > `find_a_file` in the previous commit is actually dead. > > gcc/ChangeLog: > > * gcc.cc (find_a_file): No more mode parameter. > (read_specs): Remove mode from find_a_file call. > (struct file_at_path_info): NO more mode field. > (file_at_path): Remove mode from find_a_file call. > (program_at_path): Hardcode X_OK mode choice > (find_a_program): Don't set removed mode field. > (end_going_arg): Remove mode from find_a_file call. > (find_file): Remove mode from find_a_file call. > (driver::set_up_specs): Remove mode from find_a_file call. > (include_spec_function): Remove mode from find_a_file call. > > Signed-off-by: John Ericson <g...@johnericson.me> > --- > ....