Deutsch   English   Français   Italiano  
<102lsum$pcap$1@raubtier-asyl.eternal-september.org>

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

Path: news.eternal-september.org!eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita Montero <Bonita.Montero@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Loops (was Re: do { quit; } else { })
Date: Sun, 15 Jun 2025 09:32:39 +0200
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <102lsum$pcap$1@raubtier-asyl.eternal-september.org>
References: <vspbjh$8dvd$1@dont-email.me> <86plggzilx.fsf@linuxsc.com>
 <vvnsvt$3k1mu$1@dont-email.me> <86ldr4yx0x.fsf@linuxsc.com>
 <vvpmm2$3dhl$1@dont-email.me> <vvpsji$4jht$1@dont-email.me>
 <vvr5mg$l85c$1@dont-email.me> <vvt2tg$14otk$2@dont-email.me>
 <1000cs3$2234m$1@dont-email.me> <87sel8nqid.fsf@nosuchdomain.example.com>
 <20250513202557.281@kylheku.com> <87o6vvbxmp.fsf@nosuchdomain.example.com>
 <86jz5jrbrz.fsf@linuxsc.com>
 <102jikt$4hdj$1@raubtier-asyl.eternal-september.org>
 <Edf3Q.52977$kg6.23751@fx38.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 15 Jun 2025 09:32:38 +0200 (CEST)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="f7ff19f6dadb7c41a76e0d3a960f3a0b";
	logging-data="831833"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+tFnvDe1MY3sNJ8RTDba8g4dkeJqNyXd4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:xlFV2mlhJZwTxFYSkFOcHAwIC3k=
Content-Language: de-DE
In-Reply-To: <Edf3Q.52977$kg6.23751@fx38.iad>

Am 14.06.2025 um 15:57 schrieb Scott Lurndal:
> Bonita Montero <Bonita.Montero@gmail.com> writes:
>> Am 10.06.2025 um 15:01 schrieb Tim Rentsch:
>>
>>> Consider the following program:
>>>
>>>      #include <stdio.h>
>>>      #include <string.h>
>>>
>>>      typedef unsigned long long ULL;
>>>      ULL hello = ((((0ULL +'o' <<8) +'l' <<8) +'l' <<8) +'e' <<8) + 'h';
>>>
>>>      int
>>>      main(){
>>>         printf( "length is %zu\n", strlen( (char*)&hello ) );
>>>         return  0;
>>>      }
>>>
>>> On a little endian machine (with CHAR_BIT == 8) this program works,
>>> and TTBOMK conforms to both the letter and the spirit of the C
>>> standard, without any undefined behavior (on that platform).  Yet
>>> there are no arrays in sight, and certainly no array objects.
>>
>> There are not much remaining big-endian architectures today.
> 
> Ethernet is big-endian at the byte level and little-endian
> at the bit level.

However, little-endian is simply the smarter concept.