Liste des Groupes | Revenir à cl c |
On 25/06/2024 22:13, Keith Thompson wrote:DFS <nospam@dfs.com> writes:>
[...]Can you use tcc to generate assembly from a .c source file?No, tcc has no such option.
>
similar to:
>
$ gcc -S sourcefile.c
I was able to get an assembly listing by running `tcc -c
sourcefile.c`
followed by `objdump -d sourcefile.o`.
<https://godbolt.org> has tcc on its list of C compilers, and it shows
the generated assembly. I don't know how it does this - perhaps using
this same method. If people are interested in looking at the code
generated by tcc (or vast numbers of other compilers, versions and
targets), then godbolt is usually the easiest way to get it.
>
And if anyone wants to know how they get the nice assembly out of the
compilers, the source code for godbolt is also freely available.
Les messages affichés proviennent d'usenet.