This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Enhancement patch for cpp


Ooops....should have looked closer.

The warning in cppfiles.c needs to be generated using:

     cpp_warning (pfile, "nonexistent include directory %s", newdir);

Dave

Ben Elliston wrote:

> 1999-01-15  Ben Elliston  <bje@cygnus.com>
>
>         * cppfiles.c (append_include_chain): Emit a warning if the
>         directory specified in a -I flag does not exist.
>
>         * cccp.c (new_include_prefix): Likewise.
>
> Index: cccp.c
> ===================================================================
> RCS file: /egcs/carton/cvsfiles/egcs/gcc/cccp.c,v
> retrieving revision 1.54
> diff -c -r1.54 cccp.c
> *** cccp.c      1999/01/13 10:46:40     1.54
> --- cccp.c      1999/01/15 15:43:57
> ***************
> *** 10497,10502 ****
> --- 10497,10507 ----
>       if (stat (len ? dir->fname : ".", &dir->st) != 0) {
>         if (errno != ENOENT && errno != ENOTDIR)
>         error_from_errno (dir->fname);
> +       else
> +       {
> +         if (len > 0)
> +           warning ("nonexistent include directory %s", dir->fname);
> +       }
>         free (dir);
>         return 0;
>       }
> Index: cppfiles.c
> ===================================================================
> RCS file: /egcs/carton/cvsfiles/egcs/gcc/cppfiles.c,v
> retrieving revision 1.10
> diff -c -r1.10 cppfiles.c
> *** cppfiles.c  1999/01/06 19:54:27     1.10
> --- cppfiles.c  1999/01/15 15:44:02
> ***************
> *** 79,87 ****
>     simplify_pathname (newdir);
>     if (stat (newdir, &st))
>       {
> -       /* Dirs that don't exist are silently ignored. */
>         if (errno != ENOENT)
>         cpp_perror_with_name (pfile, newdir);
>         return;
>       }
>
> --- 79,88 ----
>     simplify_pathname (newdir);
>     if (stat (newdir, &st))
>       {
>         if (errno != ENOENT)
>         cpp_perror_with_name (pfile, newdir);
> +       else
> +       warning ("nonexistent include directory %s", newdir);
>         return;
>       }





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]