Deutsch   English   Français   Italiano  
<v45h7d$3tdeb$1@dont-email.me>

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: bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: C23 thoughts and opinions
Date: Mon, 10 Jun 2024 01:26:23 +0100
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <v45h7d$3tdeb$1@dont-email.me>
References: <v2l828$18v7f$1@dont-email.me> <v38of2$1gsj2$1@dont-email.me>
 <v39v87$1n7bk$1@dont-email.me> <20240530170836.00005fa0@yahoo.com>
 <v3a3k5$1ntrn$1@dont-email.me> <20240530180345.00003d9f@yahoo.com>
 <v3chc4$27uij$1@dont-email.me> <20240531161937.000063af@yahoo.com>
 <20240531162811.00006719@yahoo.com> <20240531164835.00007128@yahoo.com>
 <v3cldt$28n91$2@dont-email.me> <20240531173437.00003bee@yahoo.com>
 <v3d3ct$2b5sl$1@dont-email.me> <v3d97c$2c6ea$1@dont-email.me>
 <22r6O.5934$xPJ1.2590@fx09.iad> <v3t6nu$1liet$1@dont-email.me>
 <v3tlmo$1o860$7@dont-email.me> <v427sv$2no3h$1@dont-email.me>
 <v42cs4$2pjrh$1@dont-email.me> <20240609124032.00004eb1@yahoo.com>
 <v43vkr$3d7el$1@dont-email.me> <20240609141239.00006be6@yahoo.com>
 <v44lf7$3kpef$1@dont-email.me> <20240609200014.000014be@yahoo.com>
 <v451v8$3oq3d$1@dont-email.me> <20240609234007.0000162e@yahoo.com>
 <v4581i$3qmf9$1@dont-email.me> <20240610010653.00005f00@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 10 Jun 2024 02:26:21 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b8a301eea9614dff910c6cbcaf87417e";
	logging-data="4109771"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19G2MISeSUh/s8uFkDPwPdR"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JaY4cUhrXGE4RAkjSJBImbTyRV0=
In-Reply-To: <20240610010653.00005f00@yahoo.com>
Content-Language: en-GB
Bytes: 4288

On 09/06/2024 23:06, Michael S wrote:
> On Sun, 9 Jun 2024 22:49:39 +0100
> bart <bc@freeuk.com> wrote:
> 
>> On 09/06/2024 21:40, Michael S wrote:
>>> I can only tell you what works well for me. I can't force you to
>>> use it. Also, I can't prevent you from trying to use something that
>>> no longer works well due to absence of support, i.e. old msys/mingw.
>>>    
>>
>> I was trying to install the LATEST version of gcc on Windows! That
>> would 13.x, which I've done before, perhaps hitting on the right link
>> by chance.
>>
>> 'gcc' /can/ be run from a pure Windows command line, as I've been
>> using versions of it for years.
>>
>> But they don't make it easy, as gcc is perceived to be tied to WSL
>> MSYS2 MINGW CYGWIN.
>>
>> I've had another go at this elusive compiler, this time apparently
>> successful. Here are the steps I used:
....
>>
>> The end result was a 1.4GB installation of gcc 14.1.0. Using 'gcc
>> hello.c -Os -s' gives of 48KB (with 10.3 it was 88KB). It still
>> imports msvcrt.dll, but not printf (it does import vfprintf).
>>
> 
> It sounds like you ended up with gcc distro based on 12 y.o. Microsoft
> DLL that does not support majority of c11 library features and likely
> does not support few c99 library features as well.
> If you were a little less stubborn, in 10 minutes you could have have
> distro based on new ucrt DLL that is closer to new C standard and
> generates smaller binaries.
> And likely occupies less than 1.4 GB.

I downloaded a different 14.1 version that was 'only' 0.8GB. (Compared 
to 1.4GB; it's still 2000 times bigger than my main compiler!)

That uses UCRT, but the size difference is probably due to not including 
LLVM/Clang stuff. (Which didn't work anyway; I think clang triggered my AV.)

This now gives a hello.c executable of 22KB; it was 48KB with the 1.4GB 
download, and 88KB with 10.3.0.


> BTW, I don't understand why MSVC produces smaller binaries with old MS C
> RTL DLL while gcc produces smaller binaries with new MS C RTL DLL.
> But that's undeniable fact.

I think the sizes of the runtime libraries are irrelevant if they are 
both dynamically linked. It's what the compiler puts directly into the 
executable that makes the difference. And here they are just too diverse 
in how they work. It can't be the 20 bytes of code for hello.c that 
affects it.