* Patch RFA: Don't make -I filename be an error
@ 2010-09-15 15:51 Ian Lance Taylor
2010-09-15 18:15 ` Joseph S. Myers
0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2010-09-15 15:51 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]
Back in http://gcc.gnu.org/ml/gcc-patches/1998-11/msg00379.html Zack
added a check to cpplib for whether a name given with -I was a
directory. If it was not, cpplib would issue an error. The old cccp
preprocessor would not issue an error for this case. The error still
exists today. I think it should be a warning rather than an error. If
I write gcc -I include and happen to have a file named "include" rather
than a directory, I don't see any reason for the compilation to fail.
This patch changes it from an error to a warning. It has been
bootstrapped and tested on x86_64-unknown-linux-gnu.
OK for mainline?
Ian
2010-09-15 Ian Lance Taylor <iant@google.com>
* incpath.c (remove_duplicates): If name is not a directory, issue
a warning rather than an error.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: warning --]
[-- Type: text/x-diff, Size: 420 bytes --]
Index: incpath.c
===================================================================
--- incpath.c (revision 164305)
+++ incpath.c (working copy)
@@ -239,7 +239,7 @@ remove_duplicates (cpp_reader *pfile, st
}
}
else if (!S_ISDIR (st.st_mode))
- cpp_error_with_line (pfile, CPP_DL_ERROR, 0, 0,
+ cpp_error_with_line (pfile, CPP_DL_WARNING, 0, 0,
"%s: not a directory", cur->name);
else
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch RFA: Don't make -I filename be an error
2010-09-15 15:51 Patch RFA: Don't make -I filename be an error Ian Lance Taylor
@ 2010-09-15 18:15 ` Joseph S. Myers
2010-09-22 10:29 ` Mark Mitchell
0 siblings, 1 reply; 3+ messages in thread
From: Joseph S. Myers @ 2010-09-15 18:15 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-patches
On Wed, 15 Sep 2010, Ian Lance Taylor wrote:
> Back in http://gcc.gnu.org/ml/gcc-patches/1998-11/msg00379.html Zack
> added a check to cpplib for whether a name given with -I was a
> directory. If it was not, cpplib would issue an error. The old cccp
> preprocessor would not issue an error for this case. The error still
> exists today. I think it should be a warning rather than an error. If
> I write gcc -I include and happen to have a file named "include" rather
> than a directory, I don't see any reason for the compilation to fail.
>
> This patch changes it from an error to a warning. It has been
> bootstrapped and tested on x86_64-unknown-linux-gnu.
>
> OK for mainline?
OK.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch RFA: Don't make -I filename be an error
2010-09-15 18:15 ` Joseph S. Myers
@ 2010-09-22 10:29 ` Mark Mitchell
0 siblings, 0 replies; 3+ messages in thread
From: Mark Mitchell @ 2010-09-22 10:29 UTC (permalink / raw)
To: gcc-patches
On 9/15/2010 9:11 AM, Joseph S. Myers wrote:
> On Wed, 15 Sep 2010, Ian Lance Taylor wrote:
>
>> Back in http://gcc.gnu.org/ml/gcc-patches/1998-11/msg00379.html Zack
>> added a check to cpplib for whether a name given with -I was a
>> directory.
>> This patch changes it from an error to a warning.
What happens in that case? Do we still keep searching for a directory,
or do we stop after giving the warning?
I have no opinion; I just wonder if we ought to document whatever it is
we do.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-22 0:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-15 15:51 Patch RFA: Don't make -I filename be an error Ian Lance Taylor
2010-09-15 18:15 ` Joseph S. Myers
2010-09-22 10:29 ` Mark Mitchell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).