diff --git a/core/org.eclipse.cdt.core/parser/ChangeLog b/core/org.eclipse.cdt.core/parser/ChangeLog index 2e26739f780..1c449ce066a 100644 --- a/core/org.eclipse.cdt.core/parser/ChangeLog +++ b/core/org.eclipse.cdt.core/parser/ChangeLog @@ -1,3 +1,6 @@ +2003-07-28 John Camelon + Fixed Bug 40730 : Parser is not searching the include path for #include"" + 2003-07-28 Victor Mozgin Fixed PR 39537 : Parser fails if template parameters contain '>' or '<' characters. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java index b1f4e5f9ef1..c2999cec0c7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java @@ -322,10 +322,15 @@ public class Scanner implements IScanner { 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 ); + } } if (throwExceptionOnInclusionNotFound && inclusionReader == null )