This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Enhancement patch for cpp
- To: Ben Elliston <bje at cygnus dot com>
- Subject: Re: Enhancement patch for cpp
- From: Dave Brolley <brolley at cygnus dot com>
- Date: Fri, 15 Jan 1999 13:03:44 -0500
- CC: egcs-patches at cygnus dot com
- Organization: Cygnus Solutions Canada Ltd
- References: <Pine.LNX.3.95.990116024708.3365A-100000@moshpit.cygnus.com>
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;
> }