Re: C23 thoughts and opinions

Liste des GroupesRevenir à cl c 
Sujet : Re: C23 thoughts and opinions
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.c
Date : 02. Jun 2024, 01:26:41
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <867cf8p4u6.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
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.

Date Sujet#  Auteur
31 May 24 * Re: C23 thoughts and opinions73bart
31 May 24 +* Re: C23 thoughts and opinions67Michael S
31 May 24 i+* Re: C23 thoughts and opinions65Michael S
31 May 24 ii`- Re: C23 thoughts and opinions64Michael S
31 May 24 i`- Re: C23 thoughts and opinions1bart
31 May 24 +- Re: C23 thoughts and opinions1Kaz Kylheku
31 May 24 +- Re: C23 thoughts and opinions1Malcolm McLean
1 Jun 24 `* Re: C23 thoughts and opinions3Malcolm McLean
1 Jun 24  `* Re: C23 thoughts and opinions2bart
1 Jun 24   `- Re: C23 thoughts and opinions1Malcolm McLean

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal