| Deutsch English Français Italiano |
|
<vi73sh$agj$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Thiago Adams <thiago.adams@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: question about linker
Date: Wed, 27 Nov 2024 09:38:41 -0300
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <vi73sh$agj$2@dont-email.me>
References: <vi54e9$3ie0o$1@dont-email.me> <vi56tj$3ip1o$1@dont-email.me>
<vi583f$3ie0o$3@dont-email.me> <vi59df$3ip1o$3@dont-email.me>
<vi5qu0$3md4n$1@dont-email.me> <vi5u16$3me78$1@dont-email.me>
<vi71f9$7be$1@dont-email.me> <vi727c$7be$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 27 Nov 2024 13:38:41 +0100 (CET)
Injection-Info: dont-email.me; posting-host="55a7253bc8aad96d55ac3768212cd6ac";
logging-data="10771"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+m5yoQaXzmg8O+Jztpw6VS+qSNIS146Ds="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:/BGU1nDzJaO8qiGp7emvYBBFMlA=
Content-Language: en-US
In-Reply-To: <vi727c$7be$2@dont-email.me>
Bytes: 2558
On 27/11/2024 09:10, Bart wrote:
> On 27/11/2024 11:57, Bart wrote:
>> On 27/11/2024 01:52, Thiago Adams wrote:
>
>> I also use ILs for my compilers, but I write my own backends. I've
>> worked on two diifferent kinds. One looks like a HLL, and only exists
>> for my language. So this original source:
>
> I forgot to say that I've also tried transpiling to C from my language.
>
> That makes some things simpler (I don't need to write the backend! And I
> get optimisation for free), but C is a poor fit for my language. So
> programs that need to be transpiled to C can only use a restricted,
> crippled set of features.
>
> My HLL example produces this C:
>
> static void $t$f(void) {
> i64 r;
> i64 a;
> i64 b;
> i64 c;
> r = (a + (b * c));
> }
>
> The advantage of my ILs is that they don't have the restrictions of C.
> For example, they will translate this:
>
> (c | a | b) := 0 # (assign 0 to either a or b)
>
> with no problem. The C transpiler will produce this:
>
> (!!(c) ? a : b) = (i64)0;
>
> But this is not legal C.
But you can write it in a different way, can't you?
This raises the question what cannot be done in C?