[cfe-dev] clang and #line directives

Daniel Dunbar daniel at zuster.org
Thu Sep 11 13:17:25 PDT 2008


Hi Moritz,

I went ahead and opened a placeholder bug for this issue,
http://llvm.org/PR2788

I started looking into fixing this issue last week but it is tied closer to
the underlying architecture than I thought. I am waiting for Chris, who
wrote the preprocessor, to get back before moving forward.

It is definitely a high priority.

 - Daniel

On Thu, Sep 11, 2008 at 9:39 AM, Moritz Lenz
<moritz at casella.verplant.org> wrote:
> Hash: SHA1
>
> At the moment #line preprocessor directives don't seem to be implemented:
>
> // file foo.c
> int main(int argc, char** argv){
> #line 70
>    printf("Line %d\n", __LINE__);
>    return
> }
>
> $ ccc foo.c && ./a.out
> clang -emit-llvm-bc -x c -o foo.o foo.c
> llvm-ld -native -disable-internalize -o a.out foo.o
> Line 3
>
> Sadly parrot needs that print out 'Line 70' to work (the build system
> has some weird hooks where macro names are associated with line numbers
> in generated code).
>
> Are there any plans to add that soonish?
>
> Moritz
> (Please keep me cc'ed, I'm not on the list)
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>



More information about the cfe-dev mailing list