[cfe-commits] [patch] Avoid gcc warning when using the clang preprocessor

Chris Lattner clattner at apple.com
Mon Sep 28 14:00:59 PDT 2009


On Sep 28, 2009, at 10:14 AM, Rafael Espindola wrote:

> I am trying to use clang to preprocess source code and pipe the output
> to gcc. With a current clang and gcc 4.5 I am getting the warning
>
> line-map.c: file "test.c" left but not entered
>
> This is caused by clang exiting the main file "test.c":
>
> # 1 "test.c" 2
>
> The attached patch fixes the problem.

Strange, can you elaborate about what the problem is?  Doing a string  
equality comparison to detect this seems expensive, is there another  
way to catch this?  Also, can you make the testcase a positive check  
("grep" or filecheck) instead of a negative one ("not grep")?

-Chris



More information about the cfe-commits mailing list