Deutsch   English   Français   Italiano  
<87zfr7s5yn.fsf@nosuchdomain.example.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Baby X is bor nagain
Date: Wed, 26 Jun 2024 15:18:56 -0700
Organization: None to speak of
Lines: 34
Message-ID: <87zfr7s5yn.fsf@nosuchdomain.example.com>
References: <v494f9$von8$1@dont-email.me> <v4plsk$nn9o$2@dont-email.me>
	<v4pnq6$o4fs$1@dont-email.me> <v4q245$si2n$1@dont-email.me>
	<v4q2rl$sqk3$1@dont-email.me> <v52308$2nli8$3@dont-email.me>
	<v53i4s$33k73$2@dont-email.me> <v53lf7$34huc$1@dont-email.me>
	<v53vh6$368vf$1@dont-email.me> <v54se1$3bqsk$1@dont-email.me>
	<20240624160941.0000646a@yahoo.com> <v5bu5r$va3a$1@dont-email.me>
	<v5c275$vq9k$1@dont-email.me> <v5c6bf$10sr7$1@dont-email.me>
	<v5c9jk$1159j$1@dont-email.me> <v5cnm9$14dri$1@dont-email.me>
	<v5duid$1fid4$1@dont-email.me> <v5e92f$1gs9a$1@dont-email.me>
	<667af5ce$0$2873002$882e4bbb@reader.netnews.com>
	<874j9gu6fu.fsf@nosuchdomain.example.com>
	<v5gfm5$21ekk$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Thu, 27 Jun 2024 00:18:57 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="2dc86e450632c25820fa91c1ec368267";
	logging-data="2469342"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18RigPSm9YmX2WaUqmhcKDF"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:Ac9pwBSr91ETdD/O1+pWEmF3j0k=
	sha1:jd31xo/QInnFAoR6tcbbqxI/sGw=
Bytes: 2898

David Brown <david.brown@hesbynett.no> writes:
> 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?
>>>
>>> similar to:
>>>
>>> $ gcc -S sourcefile.c
>> No, tcc has no such option.
>> 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.

https://godbolt.org/z/3b18qno37

The assembly listing doesn't look like objdump output, and the output
window on the lower right looks like tcc itself generated
"/app/output.s".  A quick look at the source code was unhelpful.

I've emailed Matt Goldbolt and asked him about this.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */