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]
Other format: [Raw text]

[Patch] bug 18102 framework/header search path


on darwin with the -F and -I flags if the same dir
appears twice, the framework headers wouldn't be
searched for unless the -F flag is first, because
remove_duplicates would remove the second

this patch considers them to differ if the paths are
the same but the constructs differ.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18102


ChangeLog:
2004-11-19  Matt Rice <ratmice@yahoo.com>
c-incpath.c (remove_duplicates): check for construct
equality.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Index: c-incpath.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/c-incpath.c,v
retrieving revision 1.7.2.8
diff -u -p -r1.7.2.8 c-incpath.c
--- c-incpath.c	31 Jul 2004 06:19:03 -0000	1.7.2.8
+++ c-incpath.c	20 Nov 2004 03:20:33 -0000
@@ -211,7 +211,8 @@ remove_duplicates (cpp_reader *pfile, st
 	  /* Remove this one if it is in the system chain.  */
 	  reason = REASON_DUP_SYS;
 	  for (tmp = system; tmp; tmp = tmp->next)
-	    if (INO_T_EQ (tmp->ino, cur->ino) && tmp->dev == cur->dev)
+	    if (INO_T_EQ (tmp->ino, cur->ino) && tmp->dev == cur->dev
+	    	&& cur->construct == tmp->construct)
 	      break;
 
 	  if (!tmp)
@@ -219,14 +220,16 @@ remove_duplicates (cpp_reader *pfile, st
 	      /* Duplicate of something earlier in the same chain?  */
 	      reason = REASON_DUP;
 	      for (tmp = head; tmp != cur; tmp = tmp->next)
-		if (INO_T_EQ (cur->ino, tmp->ino) && cur->dev == tmp->dev)
+		if (INO_T_EQ (cur->ino, tmp->ino) && cur->dev == tmp->dev
+		    && cur->construct == tmp->construct)
 		  break;
 
 	      if (tmp == cur
 		  /* Last in the chain and duplicate of JOIN?  */
 		  && !(cur->next == NULL && join
 		       && INO_T_EQ (cur->ino, join->ino)
-		       && cur->dev == join->dev))
+		       && cur->dev == join->dev
+		       && cur->construct == join->construct))
 		{
 		  /* Unique, so keep this directory.  */
 		  pcur = &cur->next;

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