From b2861325a9bd0760aa921c0b76554785a9d2a46b Mon Sep 17 00:00:00 2001 From: Prasad Ghangal Date: Fri, 30 Sep 2016 17:21:26 +0000 Subject: [PATCH] re PR other/31566 (@missing_file gives bad error message) PR other/31566 * gcc.c (process_command): For @filename handling, output the correct name if the file does not exist. From-SVN: r240669 --- gcc/ChangeLog | 6 ++++++ gcc/gcc.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e17581aab2e..22801a2f90e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-09-30 Prasad Ghangal + + PR other/31566 + * gcc.c (process_command): For @filename handling, output + the correct name if the file does not exist. + 2016-09-30 Marek Polacek * config/aarch64/aarch64-simd.md: Adjust fall through comments. diff --git a/gcc/gcc.c b/gcc/gcc.c index d3e8c88ac68..fd2b182edc6 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -4417,7 +4417,12 @@ process_command (unsigned int decoded_options_count, fname = xstrdup (arg); if (strcmp (fname, "-") != 0 && access (fname, F_OK) < 0) - perror_with_name (fname); + { + if (fname[0] == '@' && access (fname + 1, F_OK) < 0) + perror_with_name (fname + 1); + else + perror_with_name (fname); + } else add_infile (arg, spec_lang); -- 2.30.2