Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Applied [HEAD] : Fix for bug 40730

CORE 
        Fixed Bug 40730 : Parser is not searching the include path for 
#include"<name>" 

Sean, let me know if this works for you. 

JohnC

Index: parser/ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/ChangeLog,v
retrieving revision 1.88
diff -u -r1.88 ChangeLog
--- parser/ChangeLog	28 Jul 2003 14:18:36 -0000	1.88
+++ parser/ChangeLog	28 Jul 2003 15:40:17 -0000
@@ -1,3 +1,6 @@
+2003-07-28 John Camelon
+	Fixed Bug 40730 : Parser is not searching the include path for #include"<name>" 
+
 2003-07-28 Victor Mozgin
 	Fixed PR 39537 : Parser fails if template parameters contain '>' or '<'  characters.
 
Index: parser/org/eclipse/cdt/internal/core/parser/Scanner.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java,v
retrieving revision 1.44
diff -u -r1.44 Scanner.java
--- parser/org/eclipse/cdt/internal/core/parser/Scanner.java	28 Jul 2003 00:02:34 -0000	1.44
+++ parser/org/eclipse/cdt/internal/core/parser/Scanner.java	28 Jul 2003 15:40:19 -0000
@@ -322,9 +322,14 @@
 					inclusionReader =
 						new FileReader(includeFile);
 				} catch (FileNotFoundException fnf) {
-					if (throwExceptionOnInclusionNotFound)
-						throw new ScannerException("Cannot find inclusion " + fileName);	
+					// the spec says that if finding in the local directory fails, search the include paths
+					handleInclusion( fileName, true, nameOffset, beginOffset, endOffset );
 				}
+			}
+			else
+			{
+				// the spec says that if finding in the local directory fails, search the include paths
+				handleInclusion( fileName, true, nameOffset, beginOffset, endOffset );
 			}
 		}
 

Back to the top