Yakov, with mod on Windows I tried this:

 

c:\tmp>type foo.c

int main() {

    #line 30 "demo.c"

    printf("hello\n");

    #line 40 "demo.c"

    return 0;

}

 

c:\tmp>tcc -E foo.c

# 1 "foo.c"

int main() {

# 30 "demo.c"

    printf("hello\n");

# 40 "demo.c"

    return 0;

}

 

On it’s side gcc gives:

c:\tmp>gcc -E foo.c

# 1 "foo.c"

# 1 "<built-in>"

# 1 "<command-line>"

# 1 "foo.c"

int main() {

# 30 "demo.c"

    printf("hello\n");

# 40 "demo.c"

    return 0;

}

 

And cl gives:

 

#line 1 "foo.c"

int main() {

    #line 30 "demo.c"

    printf("hello\n");

    #line 40 "demo.c"

    return 0;

}

 

Which looks correct. Is there something I’m missing with the issue you’re 
facing?

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On 
Behalf Of Yakov
Sent: vendredi 13 avril 2018 02:36
To: Tinycc-devel@nongnu.org
Subject: [Tinycc-devel] #line directive with file name

 

I am curious why my copy of TinyC ignores the second argument to the #line 
directive?

In a file named prog.c I am trying to rename lines as if they come from demo.c

int main() {

    #line 30 "demo.c"

    printf("hello\n");

    #line 40 "demo.c"

    return 0;

}

It works as expected for GCC, but TinyC will always print prog.c ignoring the 
argument.

Latest tcc from git. Ubuntu. x86_64. Musl. (Because GNU LibC does not work with 
addr2line).

 

Thanks,

Yakov

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to