re PR other/31566 (@missing_file gives bad error message)
authorPrasad Ghangal <prasad.ghangal@gmail.com>
Fri, 30 Sep 2016 17:21:26 +0000 (17:21 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 30 Sep 2016 17:21:26 +0000 (11:21 -0600)
       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
gcc/gcc.c

index e17581aab2e5f772b6e2f3a66fbfe849b372ba75..22801a2f90e9c3d1a852332d17426a6506c2b07f 100644 (file)
@@ -1,3 +1,9 @@
+2016-09-30  Prasad Ghangal  <prasad.ghangal@gmail.com>
+
+       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  <polacek@redhat.com>
 
        * config/aarch64/aarch64-simd.md: Adjust fall through comments.
index d3e8c88ac682c63e46dcf9bde2fae519ddd3f851..fd2b182edc690015dcb8cffc4c50cefdbcdbcb79 100644 (file)
--- 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);