[cfe-commits] [patch][preprocessor] Remember to exit <command line>

Rafael Espindola espindola at google.com
Mon Nov 30 08:08:23 PST 2009


ping

2009/11/23 Rafael Espindola <espindola at google.com>:
> This is an updated version of an old patch.
>
> clang's preprocessor output for
> -------------------------------------------
> int main(int argc, char*argv[]) {
>  return 0;
> }
> ------------------------------------------
> is
> ------------------------------------------
> # 1 "test.c"
> # 1 "test.c" 1
> # 1 "<built-in>" 1
> # 1 "<built-in>" 3
> # 113 "<built-in>" 3
> # 113 "<command line>" 1
> # 1 "test.c" 2
> int main(int argc, char*argv[]) {
>  return 0;
> }
> -----------------------------------
>
> Compiling this with gcc produces the warning 'line-map.c: file
> "test.c" left but not entered'.  The wording is a bit confusing, but
> it looks like what gcc is complaining about is that we have the
> transitions
>
> test.c -> <built-in> -> <command line> -> test.c
>
> Adding a <command line> -> <built-in> transition avoids the warning.
> This is done with the line
>
> # 114 "<built-in>" 2
>
> after
>
> # 113 "<command line>" 1
>
> Cheers,
> --
> Rafael Ávila de Espíndola
>



-- 
Rafael Ávila de Espíndola




More information about the cfe-commits mailing list