Commit 8748c00f by Matt Rice Committed by Andrew Pinski

re PR preprocessor/18102 (darwin framework header search depends on order of options)

2004-12-09  Matt Rice  <ratmice@yahoo.com>

        PR preprocessor/18102
        * c-incpath.c (remove_duplicates): Check for construct
        equality.

From-SVN: r91953
parent 354e22e1
2004-12-09 Matt Rice <ratmice@yahoo.com>
PR preprocessor/18102
* c-incpath.c (remove_duplicates): Check for construct
equality.
2004-12-09 Dorit Naishlos <dorit@il.ibm.com> 2004-12-09 Dorit Naishlos <dorit@il.ibm.com>
* genopinit.c (vec_realign_store_optab): Initialization removed. * genopinit.c (vec_realign_store_optab): Initialization removed.
......
...@@ -211,7 +211,8 @@ remove_duplicates (cpp_reader *pfile, struct cpp_dir *head, ...@@ -211,7 +211,8 @@ remove_duplicates (cpp_reader *pfile, struct cpp_dir *head,
/* Remove this one if it is in the system chain. */ /* Remove this one if it is in the system chain. */
reason = REASON_DUP_SYS; reason = REASON_DUP_SYS;
for (tmp = system; tmp; tmp = tmp->next) 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; break;
if (!tmp) if (!tmp)
...@@ -219,14 +220,16 @@ remove_duplicates (cpp_reader *pfile, struct cpp_dir *head, ...@@ -219,14 +220,16 @@ remove_duplicates (cpp_reader *pfile, struct cpp_dir *head,
/* Duplicate of something earlier in the same chain? */ /* Duplicate of something earlier in the same chain? */
reason = REASON_DUP; reason = REASON_DUP;
for (tmp = head; tmp != cur; tmp = tmp->next) 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; break;
if (tmp == cur if (tmp == cur
/* Last in the chain and duplicate of JOIN? */ /* Last in the chain and duplicate of JOIN? */
&& !(cur->next == NULL && join && !(cur->next == NULL && join
&& INO_T_EQ (cur->ino, join->ino) && INO_T_EQ (cur->ino, join->ino)
&& cur->dev == join->dev)) && cur->dev == join->dev
&& cur->construct == join->construct))
{ {
/* Unique, so keep this directory. */ /* Unique, so keep this directory. */
pcur = &cur->next; pcur = &cur->next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment