Path: utzoo!attcan!uunet!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!swrinde!ucsd!rutgers!gatech!mcnc!duke!drh From: drh@duke.cs.duke.edu (D. Richard Hipp) Newsgroups: comp.lang.c Subject: Question about "#line" Keywords: GCC, bug Message-ID: <656176474@romeo.cs.duke.edu> Date: 17 Oct 90 15:14:35 GMT Organization: Duke University Computer Science Dept.; Durham, N.C. Lines: 22 When GCC tries to compile the following program: #line 40 "../another_dir/xyzzy.c" #include "incl.h" it gives this error: ../another_dir/xyzzy.c:40: incl.h: No such file or directory After some experimentation, I've determined that GCC is trying to include the file named "../another_dir/incl.h", not "./incl.h" as I want. In other words, if I first type: ln incl.h ../another_dir then everything will work fine. PCC does not exhibit this behavior -- it always looks for the include file in the current directory, regardless of any "#line" directives. Which one is correct? GCC or PCC. The PCC version makes the most sense (to me) but I don't know what ANSI says (if it says anything at all.) Does anyone else know?