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

Rafael Espindola espindola at google.com
Thu Oct 1 08:09:57 PDT 2009


> The good news is the correct one is smaller :-)

Is it OK?

The problem it fixes is that in the startup sequence:

# 1 "test.c"
# 1 "test.c" 1
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 105 "<built-in>" 3
# 105 "<command line>" 1
# 1 "test.c" 2

We are going from <buildt-in> to <command line> and then exiting
directly to test.c. The patch adds a

# 1 "<built-in>" 2

so that we exit <command line> first. This fixes the following gcc
warning when processing clang preprocessed code:

line-map.c: file "test.c" left but not entered

Cheers,
-- 
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.patch
Type: text/x-diff
Size: 963 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20091001/3fd15ca2/attachment.patch>


More information about the cfe-commits mailing list