Deutsch   English   Français   Italiano  
<867cf8p4u6.fsf@linuxsc.com>

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

Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.lang.c
Subject: Re: C23 thoughts and opinions
Date: Sat, 01 Jun 2024 17:26:41 -0700
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <867cf8p4u6.fsf@linuxsc.com>
References: <v2l828$18v7f$1@dont-email.me> <v3758s$14hfp$1@raubtier-asyl.eternal-september.org> <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> <yMo6O.3723$zfC8.2197@fx35.iad> <v3dem9$2d2v4$1@dont-email.me> <v3du01$2fej5$1@dont-email.me> <v3es0l$2nkse$1@dont-email.me> <v3f2f3$2oq04$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Sun, 02 Jun 2024 02:26:42 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="487e0958afb8d1cfa0659a77e612b1fd";
	logging-data="3188784"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+uQpB0z9VpqIWUn57HCesSjYK4eVMI3cs="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:FohHJE50I3Pc06ufkSFApqcHorw=
	sha1:Zk83lqxhOyBvpui3aJvBELKkekg=
Bytes: 2689

jak <nospam@please.ty> writes:

> bart ha scritto:
>
>> On 01/06/2024 02:37, jak wrote:
>>
>>> bart ha scritto:
>>>
>>>> I can see that the first two can be subtracted to give the sizes
>>>> of the data, which is 70 or 0x46. 0x46 is the last byte of the
>>>> address of _size, so what's happening there?  What's with the crap
>>>> in bits 16-47?
>>>>
>>>> I can extract the size using:
>>>>
>>>>  printf("%d\n", (unsigned short)&_binary_hello_c_size);
>>>>
>>>> But something is not right.  I've also asked what is the point of
>>>> the -size symbol if you can just do -end - -start, but nobody has
>>>> explained.
>>>
>>>  typedef unsigned char uchar;
>>>  extern uchar _binary_hello_c_size[];
>>>  long hello_c_size = _binary_hello_c_size - (uchar *)0;
>>
>> What result for the size did you get when you ran this?
>>
>> It seems people are just guessing what might be the right code and
>> posting random fragments!
>
> I wrote it that way precisely because I believed it was the clearest
> way.  [...]

What is most clear is that the expression used has undefined
behavior.