Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"You can have my Unix system when you pry it from my cold, dead fingers." -- Cal Keegan


devel / comp.lang.c / Re: portable way to get highest bit set?

SubjectAuthor
* portable way to get highest bit set?candycanearter07
+* Re: portable way to get highest bit set?Anton Shepelev
|+* Re: portable way to get highest bit set?David Brown
||`* Re: portable way to get highest bit set?Anton Shepelev
|| `* Re: portable way to get highest bit set?David Brown
||  `* Re: portable way to get highest bit set?Anton Shepelev
||   `* Re: portable way to get highest bit set?David Brown
||    +- Re: portable way to get highest bit set?Anton Shepelev
||    `* Re: portable way to get highest bit set?Ben Bacarisse
||     `- Re: portable way to get highest bit set?David Brown
|`* Re: portable way to get highest bit set?candycanearter07
| +- Re: portable way to get highest bit set?David Brown
| +* Re: portable way to get highest bit set?Ian C
| |+- Re: portable way to get highest bit set?Tim Rentsch
| |`- Re: portable way to get highest bit set?candycanearter07
| +* Re: portable way to get highest bit set?Tim Rentsch
| |+* Re: portable way to get highest bit set?David Brown
| ||+* Re: portable way to get highest bit set?Ben Bacarisse
| |||+* Re: portable way to get highest bit set?David Brown
| ||||`* Re: portable way to get highest bit set?Ben Bacarisse
| |||| `- Re: portable way to get highest bit set?David Brown
| |||`- Re: portable way to get highest bit set?Tim Rentsch
| ||+* Re: portable way to get highest bit set?Michael S
| |||`* Re: portable way to get highest bit set?Michael S
| ||| `- Re: portable way to get highest bit set?Anton Shepelev
| ||+- Re: portable way to get highest bit set?Michael S
| ||+- Re: portable way to get highest bit set?Michael S
| ||`- Re: portable way to get highest bit set?Michael S
| |`* Re: portable way to get highest bit set?Anton Shepelev
| | +- Re: portable way to get highest bit set?Michael S
| | `* Re: portable way to get highest bit set?Tim Rentsch
| |  `* Re: portable way to get highest bit set?Anton Shepelev
| |   `* Re: portable way to get highest bit set?Tim Rentsch
| |    +* Re: portable way to get highest bit set?Scott Lurndal
| |    |`- Re: portable way to get highest bit set?Tim Rentsch
| |    +* Re: portable way to get highest bit set?Michael S
| |    |`* Re: portable way to get highest bit set?Tim Rentsch
| |    | +* Re: portable way to get highest bit set?Michael S
| |    | |`* Re: portable way to get highest bit set?Tim Rentsch
| |    | | +* Re: portable way to get highest bit set?Michael S
| |    | | |`* Re: portable way to get highest bit set?Tim Rentsch
| |    | | | +- Re: portable way to get highest bit set?Branimir Maksimovic
| |    | | | `* Re: portable way to get highest bit set?Michael S
| |    | | |  `* Re: portable way to get highest bit set?Michael S
| |    | | |   `* Re: portable way to get highest bit set?Tim Rentsch
| |    | | |    `* Re: portable way to get highest bit set?Michael S
| |    | | |     +- Re: portable way to get highest bit set?Chris M. Thomasson
| |    | | |     `* Re: portable way to get highest bit set?Tim Rentsch
| |    | | |      `* Re: portable way to get highest bit set?Keith Thompson
| |    | | |       `- Re: portable way to get highest bit set?Tim Rentsch
| |    | | `* Re: portable way to get highest bit set?jak
| |    | |  `* Re: portable way to get highest bit set?Tim Rentsch
| |    | |   `* Re: portable way to get highest bit set?jak
| |    | |    `* Re: portable way to get highest bit set?Tim Rentsch
| |    | |     `* Re: portable way to get highest bit set?jak
| |    | |      +* Re: portable way to get highest bit set?Tim Rentsch
| |    | |      |`* Re: portable way to get highest bit set?jak
| |    | |      | `- Re: portable way to get highest bit set?Tim Rentsch
| |    | |      `* Re: portable way to get highest bit set?Kaz Kylheku
| |    | |       `* Re: portable way to get highest bit set?Bart
| |    | |        `* Re: portable way to get highest bit set?Michael S
| |    | |         `* Re: portable way to get highest bit set?Ben Bacarisse
| |    | |          `- Re: portable way to get highest bit set?Michael S
| |    | +* Re: portable way to get highest bit set?Anton Shepelev
| |    | |+* Re: portable way to get highest bit set?Tim Rentsch
| |    | ||`* Re: portable way to get highest bit set?Anton Shepelev
| |    | || +- Re: portable way to get highest bit set?Tim Rentsch
| |    | || `* Re: portable way to get highest bit set?Anton Shepelev
| |    | ||  +- Re: portable way to get highest bit set?Bart
| |    | ||  `* Re: portable way to get highest bit set?Tim Rentsch
| |    | ||   `* Re: portable way to get highest bit set?Anton Shepelev
| |    | ||    `- Re: portable way to get highest bit set?Tim Rentsch
| |    | |`* Re: portable way to get highest bit set?Tim Rentsch
| |    | | +* Re: portable way to get highest bit set?Michael S
| |    | | |+* Re: portable way to get highest bit set?Tim Rentsch
| |    | | ||`- Re: portable way to get highest bit set?Michael S
| |    | | |`* Re: portable way to get highest bit set?Anton Shepelev
| |    | | | `- Re: portable way to get highest bit set?Tim Rentsch
| |    | | `- Re: portable way to get highest bit set?David Brown
| |    | `* Re: portable way to get highest bit set?Michael S
| |    |  +- Re: portable way to get highest bit set?Michael S
| |    |  +- False positives in spam filter? (was: Re: portable way to getRay Banana
| |    |  +- Re: portable way to get highest bit set?Anton Shepelev
| |    |  `- Re: portable way to get highest bit set?Ben Bacarisse
| |    `* Re: portable way to get highest bit set?Anton Shepelev
| |     `* Re: portable way to get highest bit set?Tim Rentsch
| |      `* Re: portable way to get highest bit set?Anton Shepelev
| |       `- Re: portable way to get highest bit set?Tim Rentsch
| +* Re: portable way to get highest bit set?Richard Harnden
| |`* Re: portable way to get highest bit set?candycanearter07
| | `* Re: portable way to get highest bit set?Bart
| |  +- Re: portable way to get highest bit set?Keith Thompson
| |  `- Re: portable way to get highest bit set?candycanearter07
| `- Re: portable way to get highest bit set?Tim Rentsch
+- Re: portable way to get highest bit set?Ben Bacarisse
+* Re: portable way to get highest bit set?Lew Pitcher
|`* Re: portable way to get highest bit set?Lew Pitcher
| `* Re: portable way to get highest bit set?Lew Pitcher
|  `* Re: portable way to get highest bit set?Tim Rentsch
|   `* Re: portable way to get highest bit set?Bart
|    `* Re: portable way to get highest bit set?Tim Rentsch
+- Re: portable way to get highest bit set?Kaz Kylheku
+* Re: portable way to get highest bit set?jak
+* Re: portable way to get highest bit set?Blue-Maned_Hawk
`* Re: portable way to get highest bit set?Kaz Kylheku

Pages:12345678
Re: portable way to get highest bit set?

<ugck5i$3faav$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29841&group=comp.lang.c#29841

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Fri, 13 Oct 2023 19:34:10 -0400
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <ugck5i$3faav$1@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 13 Oct 2023 23:34:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a7f2aadffbe9c00507325980dabf22f4";
logging-data="3647839"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+shAaYOqyrFq4ud3k7bocQ+8EYms+pVJI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VSAd05bzoVb1X25WtIBIgofaT+4=
In-Reply-To: <pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
Content-Language: en-US
 by: James Kuyper - Fri, 13 Oct 2023 23:34 UTC

On 10/13/23 18:02, Blue-Maned_Hawk wrote:
> James Kuyper wrote:
>
>> On 10/12/23 09:42, Blue-Maned_Hawk wrote:
>>> Keith Thompson wrote:
>>>
>>>> A solution that depends on a header that's introduced in C23, a
>>>> standard that hasn't been published yet, is hardly portable.
>>>
>>> Well, it will be in 2024.
>>
>> You expect the new standard to be widely adopted so much quicker than
>> any previous version? Why?
>
> What?

The first version of the C standard was the one adopted most quickly. It
became standard in 1990, but code relying upon that standard did not
qualify as "portable" until at least a decade later. Adoption of the
1999 version of the standard was much slower. There's still a fair
number of people who refuse to use any version of C later than C90.
Subsequent versions of C haven't been adopted any faster than that one.
Yet, you expect code relying upon features that are new in C2023 to
become fully portable in only a year?

Re: portable way to get highest bit set?

<pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29850&group=comp.lang.c#29850

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!bluemanedhawk.eternal-september.org!.POSTED!not-for-mail
From: bluemane...@invalid.invalid (Blue-Maned_Hawk)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 02:14:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<878r86rw6y.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 14 Oct 2023 02:14:04 -0000 (UTC)
Injection-Info: bluemanedhawk.eternal-september.org; posting-host="046bb5a101b582feafc06d5d6b6b79b7";
logging-data="3824341"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19e4s3L/a2Y3NRuwWjRK/Cn0ycoNiKV4GY="
User-Agent: Pan/0.154 (Izium; 517acf4)
Cancel-Lock: sha1:vhHtg9h4XcFOLiyJZiFBc/T0X+g=
X-Face: Llanfair­pwllgwyngyll­gogery­chwyrn­dro
bwll­llan­tysilio­ gogo­goch
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACh0lEQVRYw71Z21bD
MAzzevbfkr4cHjrSXJyL044+MDa6WLEl2SkvkrZ1AbAvXO+bUGSCPYnsuIVGMpm
ZLnjX718GhAKNsp8lON2F9VrhELwIgJlBepkZjA78rVK+FkmNhEJK76UsJlz8+E
rJsjrpYouhLo/SC6qPHgakFOR8wV9+8rCfO/I/oVnmUZUp42/LW2XkLj9TCFNM9
jp5g2EmHZgpYZjCOkYU7sXVogRylJqpdggoFLG1g09Flah/7kErCxzR9HgXPYsq
0glb9cxjIz2Vsk9AmAoCSxECpD713joMKjQqLAtmMqJmXjdVvlMnMQCVITotJd1
z+fh1f1NNo+vuc1KnhWUmY7t03vydTud9BbXCtN3L2PL3bK7JCNG0GHzuZxafyB
fxevCxpm1vrwZltqw6SILCcdoCE6PGQC8wZWDA9Or7Qp5s3lAZezys0nDazs9S9
R0TjwEiksRxLkNPC1NMMWPs1bj0Ei0Yuo+JVtFLuzP1NRJ16qXWN8DhhtmS4PDg
O6mqRxs4bEJrYt087mSIow/1VzW2oFlMQuiuIy/KsUagvhdw6hSjJGlIavbLF8x
j3X47bccLcUSi0dkWh1nUZNhANT1tHKUXrNxNLbd9KPb9wDDVrKwmPQMOPQ1oy6
k5I1DwzDeRJd3jVIhDAUxq3ngzJG4CCkNXZxZVMcjefoK2J0gUY2S3rxz/RuTFx
2zHd9U+obimJXMG4edsk/2j5pTU5G1MmzbRLxkfq5EiT1GGsidvMGzi+1goGb2l
GCrN+nGnV8xj3q3JLRDVPL96vUc7Z4aJ3TN1mVqWAMJMfG+Jxh6TQqP+92iZkCU
xtglds1AB6r0aiSHKcnFck+p/c/0CbacFLQcajGcAAAAASUVORK5CYII=
 by: Blue-Maned_Hawk - Sat, 14 Oct 2023 02:14 UTC

Keith Thompson wrote:

> I don't know what was unclear. You seem to expect universal adoption of
> the C23 standard by 2024. Given the adoption speed of previous editions
> of the C standard, that's completely unrealistic.

I can't see why an implementation wouldn't adopt C23 if it didn't want to
be considered obsolete.

--
Uh. There was supposed to be a signature here, but it seems to have
disappeared.

Re: portable way to get highest bit set?

<pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29851&group=comp.lang.c#29851

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!bluemanedhawk.eternal-september.org!.POSTED!not-for-mail
From: bluemane...@invalid.invalid (Blue-Maned_Hawk)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 02:15:08 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<ugck5i$3faav$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 14 Oct 2023 02:15:08 -0000 (UTC)
Injection-Info: bluemanedhawk.eternal-september.org; posting-host="046bb5a101b582feafc06d5d6b6b79b7";
logging-data="3824341"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/IJPkW+L09aQJHkNewxVIdbGMT7++c0h4="
User-Agent: Pan/0.154 (Izium; 517acf4)
Cancel-Lock: sha1:kxcD3v6TnXaVbrGkG+4fYqEf2As=
X-Face: Llanfair­pwllgwyngyll­gogery­chwyrn­dro
bwll­llan­tysilio­ gogo­goch
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACh0lEQVRYw71Z21bD
MAzzevbfkr4cHjrSXJyL044+MDa6WLEl2SkvkrZ1AbAvXO+bUGSCPYnsuIVGMpm
ZLnjX718GhAKNsp8lON2F9VrhELwIgJlBepkZjA78rVK+FkmNhEJK76UsJlz8+E
rJsjrpYouhLo/SC6qPHgakFOR8wV9+8rCfO/I/oVnmUZUp42/LW2XkLj9TCFNM9
jp5g2EmHZgpYZjCOkYU7sXVogRylJqpdggoFLG1g09Flah/7kErCxzR9HgXPYsq
0glb9cxjIz2Vsk9AmAoCSxECpD713joMKjQqLAtmMqJmXjdVvlMnMQCVITotJd1
z+fh1f1NNo+vuc1KnhWUmY7t03vydTud9BbXCtN3L2PL3bK7JCNG0GHzuZxafyB
fxevCxpm1vrwZltqw6SILCcdoCE6PGQC8wZWDA9Or7Qp5s3lAZezys0nDazs9S9
R0TjwEiksRxLkNPC1NMMWPs1bj0Ei0Yuo+JVtFLuzP1NRJ16qXWN8DhhtmS4PDg
O6mqRxs4bEJrYt087mSIow/1VzW2oFlMQuiuIy/KsUagvhdw6hSjJGlIavbLF8x
j3X47bccLcUSi0dkWh1nUZNhANT1tHKUXrNxNLbd9KPb9wDDVrKwmPQMOPQ1oy6
k5I1DwzDeRJd3jVIhDAUxq3ngzJG4CCkNXZxZVMcjefoK2J0gUY2S3rxz/RuTFx
2zHd9U+obimJXMG4edsk/2j5pTU5G1MmzbRLxkfq5EiT1GGsidvMGzi+1goGb2l
GCrN+nGnV8xj3q3JLRDVPL96vUc7Z4aJ3TN1mVqWAMJMfG+Jxh6TQqP+92iZkCU
xtglds1AB6r0aiSHKcnFck+p/c/0CbacFLQcajGcAAAAASUVORK5CYII=
 by: Blue-Maned_Hawk - Sat, 14 Oct 2023 02:15 UTC

James Kuyper wrote:

> The first version of the C standard was the one adopted most quickly. It
> became standard in 1990, but code relying upon that standard did not
> qualify as "portable" until at least a decade later. Adoption of the
> 1999 version of the standard was much slower. There's still a fair
> number of people who refuse to use any version of C later than C90.
> Subsequent versions of C haven't been adopted any faster than that one.
> Yet, you expect code relying upon features that are new in C2023 to
> become fully portable in only a year?

Portability to obsolete systems does not matter.

--
Something's wrong with my signature and i'm going to go into a test group
to figure out what it is.

Re: portable way to get highest bit set?

<ugd301$3ln97$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29852&group=comp.lang.c#29852

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Fri, 13 Oct 2023 23:47:13 -0400
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <ugd301$3ln97$1@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<878r86rw6y.fsf@nosuchdomain.example.com>
<pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Oct 2023 03:47:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a7f2aadffbe9c00507325980dabf22f4";
logging-data="3857703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bP3PMYQiNxTIqQTMRS6pFcMsr6YT2ex0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:+XK8jw2ria2O4gSYjzhBUtuOgpM=
In-Reply-To: <pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>
Content-Language: en-US
 by: James Kuyper - Sat, 14 Oct 2023 03:47 UTC

On 10/13/23 22:14, Blue-Maned_Hawk wrote:
> Keith Thompson wrote:
>
>> I don't know what was unclear. You seem to expect universal adoption of
>> the C23 standard by 2024. Given the adoption speed of previous editions
>> of the C standard, that's completely unrealistic.
>
> I can't see why an implementation wouldn't adopt C23 if it didn't want to
> be considered obsolete.

That shows a lack of imagination. Many implementations have routinely
chosen to remain "obsolete" for many years after a given version of the
standard was approved. Typical reasons include a customer base that is
either not ready yet to make use of the new features, or in many cases,
are actively opposed to using them. As I pointed out earlier, there are
people who still refuse to use anything more recent than C90 - several
of them post to this newsgroup regularly. Updating the implementation to
only optionally support the new features seems an obvious solution, but
it takes time and costs money, and will be a low priority if their
customers have no particular interest in using those features.

Another common problem is implementations that have a really large
customer base, who have ambitions to acquire a large market share by
locking their customers into using proprietary extensions provided only
by their implementation. Such implementors may want to actively avoid
closely tracking the standard. They don't want people to get in the
habit of writing portable C2023; they want to people to get into the
habit of writing code that relies on version 5.1.15 of the brand X
implementation of C.

Re: portable way to get highest bit set?

<ugd37f$3ln97$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29854&group=comp.lang.c#29854

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Fri, 13 Oct 2023 23:51:11 -0400
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <ugd37f$3ln97$2@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<ugck5i$3faav$1@dont-email.me>
<pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Oct 2023 03:51:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a7f2aadffbe9c00507325980dabf22f4";
logging-data="3857703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+rPmJ3VZUqn4A9m0anCYSyvbbZ3p2JYnI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:WuAUrw3Tkc5yVAznjkXtrAgcLv4=
In-Reply-To: <pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid>
Content-Language: en-US
 by: James Kuyper - Sat, 14 Oct 2023 03:51 UTC

On 10/13/23 22:15, Blue-Maned_Hawk wrote:
> James Kuyper wrote:
>
>> The first version of the C standard was the one adopted most quickly. It
>> became standard in 1990, but code relying upon that standard did not
>> qualify as "portable" until at least a decade later. Adoption of the
>> 1999 version of the standard was much slower. There's still a fair
>> number of people who refuse to use any version of C later than C90.
>> Subsequent versions of C haven't been adopted any faster than that one.
>> Yet, you expect code relying upon features that are new in C2023 to
>> become fully portable in only a year?
>
> Portability to obsolete systems does not matter.

It does if those systems are widely used, despite being "obsolete", as
is very often the case. Keep in mind that many of the people using these
systems would not consider them "obsolete" until they are at least two
or more versions behind the standard.

Re: portable way to get highest bit set?

<FTxWM.20780$w4ec.14831@fx14.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29866&group=comp.lang.c#29866

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: portable way to get highest bit set?
Newsgroups: comp.lang.c
References: <ug5gvh$1jkar$3@dont-email.me> <pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid> <87h6mwu9rk.fsf@nosuchdomain.example.com> <pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid> <ugagv6$2vs64$1@dont-email.me> <pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid> <878r86rw6y.fsf@nosuchdomain.example.com> <pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid> <ugd301$3ln97$1@dont-email.me>
Lines: 48
Message-ID: <FTxWM.20780$w4ec.14831@fx14.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sat, 14 Oct 2023 14:49:09 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sat, 14 Oct 2023 14:49:09 GMT
X-Received-Bytes: 3477
 by: Scott Lurndal - Sat, 14 Oct 2023 14:49 UTC

James Kuyper <jameskuyper@alumni.caltech.edu> writes:
>On 10/13/23 22:14, Blue-Maned_Hawk wrote:
>> Keith Thompson wrote:
>>
>>> I don't know what was unclear. You seem to expect universal adoption of
>>> the C23 standard by 2024. Given the adoption speed of previous editions
>>> of the C standard, that's completely unrealistic.
>>
>> I can't see why an implementation wouldn't adopt C23 if it didn't want to
>> be considered obsolete.
>
>That shows a lack of imagination. Many implementations have routinely
>chosen to remain "obsolete" for many years after a given version of the
>standard was approved. Typical reasons include a customer base that is
>either not ready yet to make use of the new features, or in many cases,
>are actively opposed to using them. As I pointed out earlier, there are
>people who still refuse to use anything more recent than C90 - several
>of them post to this newsgroup regularly. Updating the implementation to
>only optionally support the new features seems an obvious solution, but
>it takes time and costs money, and will be a low priority if their
>customers have no particular interest in using those features.
>
>Another common problem is implementations that have a really large
>customer base, who have ambitions to acquire a large market share by
>locking their customers into using proprietary extensions provided only
>by their implementation. Such implementors may want to actively avoid
>closely tracking the standard. They don't want people to get in the
>habit of writing portable C2023; they want to people to get into the
>habit of writing code that relies on version 5.1.15 of the brand X
>implementation of C.

And then there is inertia. A million lines of code that works with
C90, C99 or C11 isn't going to be rewritten to use C23 features for
decades, if ever.

Then there is binary compatability with third party libraries. The
synopsys libraries, for example, are generally built against earlier
versions of the compilers and thus the C23 features are completely
uninteresting to that set of compiler users.

Then there are distribution constraints - if someone is using RedHat
enterprise linux 6, 7 or 8, they're not likely to download and build
a newer compiler version; rather they're dependent on whichever
versions redhat/ibm provides that are compatable with their third-party
libraries.

It was only in the last two years that the infrastructure in the
company was ready to support using C++11 features in our products.

Re: portable way to get highest bit set?

<vUxWM.20781$w4ec.13904@fx14.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29867&group=comp.lang.c#29867

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: portable way to get highest bit set?
Newsgroups: comp.lang.c
References: <ug5gvh$1jkar$3@dont-email.me> <pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid> <87h6mwu9rk.fsf@nosuchdomain.example.com> <pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid> <ugagv6$2vs64$1@dont-email.me> <pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid> <ugck5i$3faav$1@dont-email.me> <pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid>
Lines: 16
Message-ID: <vUxWM.20781$w4ec.13904@fx14.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sat, 14 Oct 2023 14:50:03 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sat, 14 Oct 2023 14:50:03 GMT
X-Received-Bytes: 1715
 by: Scott Lurndal - Sat, 14 Oct 2023 14:50 UTC

Blue-Maned_Hawk <bluemanedhawk@invalid.invalid> writes:
>James Kuyper wrote:
>
>> The first version of the C standard was the one adopted most quickly. It
>> became standard in 1990, but code relying upon that standard did not
>> qualify as "portable" until at least a decade later. Adoption of the
>> 1999 version of the standard was much slower. There's still a fair
>> number of people who refuse to use any version of C later than C90.
>> Subsequent versions of C haven't been adopted any faster than that one.
>> Yet, you expect code relying upon features that are new in C2023 to
>> become fully portable in only a year?
>
>Portability to obsolete systems does not matter.
>

Only in blue-maned hawk fantasy land.

Re: portable way to get highest bit set?

<ugecsv$3u3so$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29869&group=comp.lang.c#29869

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 17:42:22 +0200
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <ugecsv$3u3so$1@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<878r86rw6y.fsf@nosuchdomain.example.com>
<pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Oct 2023 15:42:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="195333fb041a6e951164e4b3e0e170ff";
logging-data="4132760"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19siRxzyfThJB7OfEk6aA7swHElsX1SlJs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:tLPXSCPbZXkSGWEkBqrH3TI2/rc=
In-Reply-To: <pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>
Content-Language: en-GB
 by: David Brown - Sat, 14 Oct 2023 15:42 UTC

On 14/10/2023 04:14, Blue-Maned_Hawk wrote:
> Keith Thompson wrote:
>
>> I don't know what was unclear. You seem to expect universal adoption of
>> the C23 standard by 2024. Given the adoption speed of previous editions
>> of the C standard, that's completely unrealistic.
>
> I can't see why an implementation wouldn't adopt C23 if it didn't want to
> be considered obsolete.
>

You are mixing different things.

The two main C implementations - gcc and clang - already support a lot
of C23. Indeed, the policy of the C standards committee is to encourage
(or even require) adoption and testing in real compilers before
standardising a feature, often it only requires small changes to
implement new language or library features in at least one of these
compilers. So you can expect fairly complete C23 implementations
shortly after the official standards publication.

But the vast majority of developers don't use the latest versions of
these tools. They use versions that come with their Linux distribution,
or mingw, or their microcontroller manufacturer's development tools, or
other pre-build toolchains. And /those/ are not updated anywhere near
as quickly. In a graph of gcc version versus user count, the median
might be a 4 or 5 years old version.

Then there are the developers themselves - they take time to change,
even when their tools support newer standards. This is particularly
true for C - perhaps the biggest single selling point of the language is
its long-term stability, and users are often conservative about new
standards. (Compare that to C++, where new standards are used much
sooner.) I believe that the solid majority of people who actively
consider and choose which C standard to use (as distinct from "whatever
the compiler gives me") use C99 or even C90, rather than C11 or C17.

I would expect C23 adoption to be a little faster than C11 and C17,
since it has a good deal more new to offer (even if people don't use all
the new features). But real-world use of C23 will definitely lag
cutting-edge compiler implementation of the standard by a long way.

Re: portable way to get highest bit set?

<317e199e-fecb-4392-8719-943ed4ce51dbn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29870&group=comp.lang.c#29870

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:2d6:b0:40d:4c6:bce6 with SMTP id a22-20020a05622a02d600b0040d04c6bce6mr546071qtx.7.1697302952859;
Sat, 14 Oct 2023 10:02:32 -0700 (PDT)
X-Received: by 2002:a05:6808:f0d:b0:3ad:da36:1dd6 with SMTP id
m13-20020a0568080f0d00b003adda361dd6mr1309366oiw.1.1697302952656; Sat, 14 Oct
2023 10:02:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Sat, 14 Oct 2023 10:02:32 -0700 (PDT)
In-Reply-To: <ugck5i$3faav$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a0d:6fc2:55b0:ca00:ace1:d2c0:eea9:45e2;
posting-account=ow8VOgoAAAAfiGNvoH__Y4ADRwQF1hZW
NNTP-Posting-Host: 2a0d:6fc2:55b0:ca00:ace1:d2c0:eea9:45e2
References: <ug5gvh$1jkar$3@dont-email.me> <pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com> <pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me> <pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<ugck5i$3faav$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <317e199e-fecb-4392-8719-943ed4ce51dbn@googlegroups.com>
Subject: Re: portable way to get highest bit set?
From: already5...@yahoo.com (Michael S)
Injection-Date: Sat, 14 Oct 2023 17:02:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2710
 by: Michael S - Sat, 14 Oct 2023 17:02 UTC

On Saturday, October 14, 2023 at 2:34:26 AM UTC+3, James Kuyper wrote:
> On 10/13/23 18:02, Blue-Maned_Hawk wrote:
> > James Kuyper wrote:
> >
> >> On 10/12/23 09:42, Blue-Maned_Hawk wrote:
> >>> Keith Thompson wrote:
> >>>
> >>>> A solution that depends on a header that's introduced in C23, a
> >>>> standard that hasn't been published yet, is hardly portable.
> >>>
> >>> Well, it will be in 2024.
> >>
> >> You expect the new standard to be widely adopted so much quicker than
> >> any previous version? Why?
> >
> > What?
> The first version of the C standard was the one adopted most quickly. It
> became standard in 1990, but code relying upon that standard did not
> qualify as "portable" until at least a decade later. Adoption of the
> 1999 version of the standard was much slower. There's still a fair
> number of people who refuse to use any version of C later than C90.
> Subsequent versions of C haven't been adopted any faster than that one.
> Yet, you expect code relying upon features that are new in C2023 to
> become fully portable in only a year?

I got an impression that by now C11 is adapted wider than C99.
But I have no proof.

Re: portable way to get highest bit set?

<ugencc$61a$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29873&group=comp.lang.c#29873

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 11:41:16 -0700
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <ugencc$61a$3@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<878r86rw6y.fsf@nosuchdomain.example.com>
<pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>
<ugd301$3ln97$1@dont-email.me> <FTxWM.20780$w4ec.14831@fx14.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Oct 2023 18:41:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2cf987f24d0b23d2f1e28b52964b1913";
logging-data="6186"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yIlH+h4srgl4dSr1pBdzK10S+7taXo3Y="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:O8pyywv3TkO9LVUtwWkh/MCNV90=
In-Reply-To: <FTxWM.20780$w4ec.14831@fx14.iad>
Content-Language: en-US
 by: Chris M. Thomasson - Sat, 14 Oct 2023 18:41 UTC

On 10/14/2023 7:49 AM, Scott Lurndal wrote:
> James Kuyper <jameskuyper@alumni.caltech.edu> writes:
>> On 10/13/23 22:14, Blue-Maned_Hawk wrote:
>>> Keith Thompson wrote:
>>>
>>>> I don't know what was unclear. You seem to expect universal adoption of
>>>> the C23 standard by 2024. Given the adoption speed of previous editions
>>>> of the C standard, that's completely unrealistic.
>>>
>>> I can't see why an implementation wouldn't adopt C23 if it didn't want to
>>> be considered obsolete.
>>
>> That shows a lack of imagination. Many implementations have routinely
>> chosen to remain "obsolete" for many years after a given version of the
>> standard was approved. Typical reasons include a customer base that is
>> either not ready yet to make use of the new features, or in many cases,
>> are actively opposed to using them. As I pointed out earlier, there are
>> people who still refuse to use anything more recent than C90 - several
>> of them post to this newsgroup regularly. Updating the implementation to
>> only optionally support the new features seems an obvious solution, but
>> it takes time and costs money, and will be a low priority if their
>> customers have no particular interest in using those features.
>>
>> Another common problem is implementations that have a really large
>> customer base, who have ambitions to acquire a large market share by
>> locking their customers into using proprietary extensions provided only
>> by their implementation. Such implementors may want to actively avoid
>> closely tracking the standard. They don't want people to get in the
>> habit of writing portable C2023; they want to people to get into the
>> habit of writing code that relies on version 5.1.15 of the brand X
>> implementation of C.
>
> And then there is inertia. A million lines of code that works with
> C90, C99 or C11 isn't going to be rewritten to use C23 features for
> decades, if ever.

A bit of sarcastic comic relief. Tell chatgpt to rewrite the the
codebase to use C23 features and produce the same results. Cross your
fingers, then jump off a bridge. Yikes!

>
> Then there is binary compatability with third party libraries. The
> synopsys libraries, for example, are generally built against earlier
> versions of the compilers and thus the C23 features are completely
> uninteresting to that set of compiler users.
>
> Then there are distribution constraints - if someone is using RedHat
> enterprise linux 6, 7 or 8, they're not likely to download and build
> a newer compiler version; rather they're dependent on whichever
> versions redhat/ibm provides that are compatable with their third-party
> libraries.
>
> It was only in the last two years that the infrastructure in the
> company was ready to support using C++11 features in our products.

Re: portable way to get highest bit set?

<ugenfn$61a$4@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29874&group=comp.lang.c#29874

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 11:43:04 -0700
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <ugenfn$61a$4@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<ugck5i$3faav$1@dont-email.me>
<pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid>
<vUxWM.20781$w4ec.13904@fx14.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Oct 2023 18:43:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2cf987f24d0b23d2f1e28b52964b1913";
logging-data="6186"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198mmrZcuT/QVEBHZ/cGFV6eTRXoPl6t9M="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:tMgy73qWADEHLf0mPkNMEWquXbw=
In-Reply-To: <vUxWM.20781$w4ec.13904@fx14.iad>
Content-Language: en-US
 by: Chris M. Thomasson - Sat, 14 Oct 2023 18:43 UTC

On 10/14/2023 7:50 AM, Scott Lurndal wrote:
> Blue-Maned_Hawk <bluemanedhawk@invalid.invalid> writes:
>> James Kuyper wrote:
>>
>>> The first version of the C standard was the one adopted most quickly. It
>>> became standard in 1990, but code relying upon that standard did not
>>> qualify as "portable" until at least a decade later. Adoption of the
>>> 1999 version of the standard was much slower. There's still a fair
>>> number of people who refuse to use any version of C later than C90.
>>> Subsequent versions of C haven't been adopted any faster than that one.
>>> Yet, you expect code relying upon features that are new in C2023 to
>>> become fully portable in only a year?
>>
>> Portability to obsolete systems does not matter.
>>
>
> Only in blue-maned hawk fantasy land.

Humm... For some god damn reason Blue-Maned_Hawk is giving me visions of
Bonita. Strange.

Re: portable way to get highest bit set?

<pan$30ee4$2ae3f3a6$c5fca1fa$1519a48c@invalid.invalid>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29875&group=comp.lang.c#29875

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!bluemanedhawk.eternal-september.org!.POSTED!not-for-mail
From: bluemane...@invalid.invalid (Blue-Maned_Hawk)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 18:45:35 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <pan$30ee4$2ae3f3a6$c5fca1fa$1519a48c@invalid.invalid>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<ugck5i$3faav$1@dont-email.me>
<pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid>
<vUxWM.20781$w4ec.13904@fx14.iad> <ugenfn$61a$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 14 Oct 2023 18:45:35 -0000 (UTC)
Injection-Info: bluemanedhawk.eternal-september.org; posting-host="046bb5a101b582feafc06d5d6b6b79b7";
logging-data="2886"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AU555jokvRWWP3BFM8QlQTVnvCQSbZ9U="
User-Agent: Pan/0.154 (Izium; 517acf4)
Cancel-Lock: sha1:+tZ7oKMpL4FjsJJW+ZJ+3tQ6nn0=
X-Face: Llanfair­pwllgwyngyll­gogery­chwyrn­dro
bwll­llan­tysilio­ gogo­goch
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACh0lEQVRYw71Z21bD
MAzzevbfkr4cHjrSXJyL044+MDa6WLEl2SkvkrZ1AbAvXO+bUGSCPYnsuIVGMpm
ZLnjX718GhAKNsp8lON2F9VrhELwIgJlBepkZjA78rVK+FkmNhEJK76UsJlz8+E
rJsjrpYouhLo/SC6qPHgakFOR8wV9+8rCfO/I/oVnmUZUp42/LW2XkLj9TCFNM9
jp5g2EmHZgpYZjCOkYU7sXVogRylJqpdggoFLG1g09Flah/7kErCxzR9HgXPYsq
0glb9cxjIz2Vsk9AmAoCSxECpD713joMKjQqLAtmMqJmXjdVvlMnMQCVITotJd1
z+fh1f1NNo+vuc1KnhWUmY7t03vydTud9BbXCtN3L2PL3bK7JCNG0GHzuZxafyB
fxevCxpm1vrwZltqw6SILCcdoCE6PGQC8wZWDA9Or7Qp5s3lAZezys0nDazs9S9
R0TjwEiksRxLkNPC1NMMWPs1bj0Ei0Yuo+JVtFLuzP1NRJ16qXWN8DhhtmS4PDg
O6mqRxs4bEJrYt087mSIow/1VzW2oFlMQuiuIy/KsUagvhdw6hSjJGlIavbLF8x
j3X47bccLcUSi0dkWh1nUZNhANT1tHKUXrNxNLbd9KPb9wDDVrKwmPQMOPQ1oy6
k5I1DwzDeRJd3jVIhDAUxq3ngzJG4CCkNXZxZVMcjefoK2J0gUY2S3rxz/RuTFx
2zHd9U+obimJXMG4edsk/2j5pTU5G1MmzbRLxkfq5EiT1GGsidvMGzi+1goGb2l
GCrN+nGnV8xj3q3JLRDVPL96vUc7Z4aJ3TN1mVqWAMJMfG+Jxh6TQqP+92iZkCU
xtglds1AB6r0aiSHKcnFck+p/c/0CbacFLQcajGcAAAAASUVORK5CYII=
 by: Blue-Maned_Hawk - Sat, 14 Oct 2023 18:45 UTC

Chris M. Thomasson wrote:

> Humm... For some god damn reason Blue-Maned_Hawk is giving me visions of
> Bonita. Strange.

Wasn't Bonita the CXX proselytizer? Don't compare me with them.

--

Re: portable way to get highest bit set?

<pan$c64d0$8c0ed5b8$62596621$789ec9e7@invalid.invalid>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29876&group=comp.lang.c#29876

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!bluemanedhawk.eternal-september.org!.POSTED!not-for-mail
From: bluemane...@invalid.invalid (Blue-Maned_Hawk)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 18:46:51 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <pan$c64d0$8c0ed5b8$62596621$789ec9e7@invalid.invalid>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<ugck5i$3faav$1@dont-email.me>
<pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid>
<ugd37f$3ln97$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 14 Oct 2023 18:46:51 -0000 (UTC)
Injection-Info: bluemanedhawk.eternal-september.org; posting-host="046bb5a101b582feafc06d5d6b6b79b7";
logging-data="2886"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yvb5jmqAuXXyPVhds2h6tKv/wPlJF0a4="
User-Agent: Pan/0.154 (Izium; 517acf4)
Cancel-Lock: sha1:GwxrgW4Wwwb8pqJwIZmIN0H1Py8=
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACh0lEQVRYw71Z21bD
MAzzevbfkr4cHjrSXJyL044+MDa6WLEl2SkvkrZ1AbAvXO+bUGSCPYnsuIVGMpm
ZLnjX718GhAKNsp8lON2F9VrhELwIgJlBepkZjA78rVK+FkmNhEJK76UsJlz8+E
rJsjrpYouhLo/SC6qPHgakFOR8wV9+8rCfO/I/oVnmUZUp42/LW2XkLj9TCFNM9
jp5g2EmHZgpYZjCOkYU7sXVogRylJqpdggoFLG1g09Flah/7kErCxzR9HgXPYsq
0glb9cxjIz2Vsk9AmAoCSxECpD713joMKjQqLAtmMqJmXjdVvlMnMQCVITotJd1
z+fh1f1NNo+vuc1KnhWUmY7t03vydTud9BbXCtN3L2PL3bK7JCNG0GHzuZxafyB
fxevCxpm1vrwZltqw6SILCcdoCE6PGQC8wZWDA9Or7Qp5s3lAZezys0nDazs9S9
R0TjwEiksRxLkNPC1NMMWPs1bj0Ei0Yuo+JVtFLuzP1NRJ16qXWN8DhhtmS4PDg
O6mqRxs4bEJrYt087mSIow/1VzW2oFlMQuiuIy/KsUagvhdw6hSjJGlIavbLF8x
j3X47bccLcUSi0dkWh1nUZNhANT1tHKUXrNxNLbd9KPb9wDDVrKwmPQMOPQ1oy6
k5I1DwzDeRJd3jVIhDAUxq3ngzJG4CCkNXZxZVMcjefoK2J0gUY2S3rxz/RuTFx
2zHd9U+obimJXMG4edsk/2j5pTU5G1MmzbRLxkfq5EiT1GGsidvMGzi+1goGb2l
GCrN+nGnV8xj3q3JLRDVPL96vUc7Z4aJ3TN1mVqWAMJMfG+Jxh6TQqP+92iZkCU
xtglds1AB6r0aiSHKcnFck+p/c/0CbacFLQcajGcAAAAASUVORK5CYII=
X-Face: Llanfair­pwllgwyngyll­gogery­chwyrn­dro
bwll­llan­tysilio­ gogo­goch
 by: Blue-Maned_Hawk - Sat, 14 Oct 2023 18:46 UTC

James Kuyper wrote:

> On 10/13/23 22:15, Blue-Maned_Hawk wrote:
>>
>> <snip/>
>>
>> Portability to obsolete systems does not matter.
>
> It does if those systems are widely used, despite being "obsolete", as
> is very often the case. Keep in mind that many of the people using these
> systems would not consider them "obsolete" until they are at least two
> or more versions behind the standard.

Then it sounds like their definitions of obsoletion are pointless.

--

Re: portable way to get highest bit set?

<ugenqn$61v$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29877&group=comp.lang.c#29877

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 11:48:56 -0700
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <ugenqn$61v$2@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<ugck5i$3faav$1@dont-email.me>
<pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid>
<vUxWM.20781$w4ec.13904@fx14.iad> <ugenfn$61a$4@dont-email.me>
<pan$30ee4$2ae3f3a6$c5fca1fa$1519a48c@invalid.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Oct 2023 18:48:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2cf987f24d0b23d2f1e28b52964b1913";
logging-data="6207"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/uMtulloT2P+YqhrndqsSqKIIyIGNLCiA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ks/2cD9E4wzu7PbxFWdgWpixqxQ=
In-Reply-To: <pan$30ee4$2ae3f3a6$c5fca1fa$1519a48c@invalid.invalid>
Content-Language: en-US
 by: Chris M. Thomasson - Sat, 14 Oct 2023 18:48 UTC

On 10/14/2023 11:45 AM, Blue-Maned_Hawk wrote:
> Chris M. Thomasson wrote:
>
>> Humm... For some god damn reason Blue-Maned_Hawk is giving me visions of
>> Bonita. Strange.
>
> Wasn't Bonita the CXX proselytizer? Don't compare me with them.

Sorry about that. I did not mean to be so mean to you. Bonita is a,
well... For some reason, when I think about Bonita I can hear toilets
flushing in the background... Toilets flushing all the way down, down,
down....

Re: portable way to get highest bit set?

<pan$b036e$461431b2$2bf7b043$d730da9d@invalid.invalid>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29878&group=comp.lang.c#29878

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!bluemanedhawk.eternal-september.org!.POSTED!not-for-mail
From: bluemane...@invalid.invalid (Blue-Maned_Hawk)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 18:53:06 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <pan$b036e$461431b2$2bf7b043$d730da9d@invalid.invalid>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<878r86rw6y.fsf@nosuchdomain.example.com>
<pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>
<ugecsv$3u3so$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 14 Oct 2023 18:53:06 -0000 (UTC)
Injection-Info: bluemanedhawk.eternal-september.org; posting-host="046bb5a101b582feafc06d5d6b6b79b7";
logging-data="2886"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sqdbHEWulAGhZFw7etI7DUR98rX5TUEQ="
User-Agent: Pan/0.154 (Izium; 517acf4)
Cancel-Lock: sha1:8wild02FCaF5L6/mEoo4LOU/a6A=
X-Face: Llanfair­pwllgwyngyll­gogery­chwyrn­dro
bwll­llan­tysilio­ gogo­goch
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACh0lEQVRYw71Z21bD
MAzzevbfkr4cHjrSXJyL044+MDa6WLEl2SkvkrZ1AbAvXO+bUGSCPYnsuIVGMpm
ZLnjX718GhAKNsp8lON2F9VrhELwIgJlBepkZjA78rVK+FkmNhEJK76UsJlz8+E
rJsjrpYouhLo/SC6qPHgakFOR8wV9+8rCfO/I/oVnmUZUp42/LW2XkLj9TCFNM9
jp5g2EmHZgpYZjCOkYU7sXVogRylJqpdggoFLG1g09Flah/7kErCxzR9HgXPYsq
0glb9cxjIz2Vsk9AmAoCSxECpD713joMKjQqLAtmMqJmXjdVvlMnMQCVITotJd1
z+fh1f1NNo+vuc1KnhWUmY7t03vydTud9BbXCtN3L2PL3bK7JCNG0GHzuZxafyB
fxevCxpm1vrwZltqw6SILCcdoCE6PGQC8wZWDA9Or7Qp5s3lAZezys0nDazs9S9
R0TjwEiksRxLkNPC1NMMWPs1bj0Ei0Yuo+JVtFLuzP1NRJ16qXWN8DhhtmS4PDg
O6mqRxs4bEJrYt087mSIow/1VzW2oFlMQuiuIy/KsUagvhdw6hSjJGlIavbLF8x
j3X47bccLcUSi0dkWh1nUZNhANT1tHKUXrNxNLbd9KPb9wDDVrKwmPQMOPQ1oy6
k5I1DwzDeRJd3jVIhDAUxq3ngzJG4CCkNXZxZVMcjefoK2J0gUY2S3rxz/RuTFx
2zHd9U+obimJXMG4edsk/2j5pTU5G1MmzbRLxkfq5EiT1GGsidvMGzi+1goGb2l
GCrN+nGnV8xj3q3JLRDVPL96vUc7Z4aJ3TN1mVqWAMJMfG+Jxh6TQqP+92iZkCU
xtglds1AB6r0aiSHKcnFck+p/c/0CbacFLQcajGcAAAAASUVORK5CYII=
 by: Blue-Maned_Hawk - Sat, 14 Oct 2023 18:53 UTC

David Brown wrote:

>
> <snip/>
>
> The two main C implementations - gcc and clang - already support a lot
> of C23. Indeed, the policy of the C standards committee is to encourage
> (or even require) adoption and testing in real compilers before
> standardising a feature, often it only requires small changes to
> implement new language or library features in at least one of these
> compilers. So you can expect fairly complete C23 implementations
> shortly after the official standards publication.
>
> But the vast majority of developers don't use the latest versions of
> these tools. They use versions that come with their Linux distribution,
> or mingw, or their microcontroller manufacturer's development tools, or
> other pre-build toolchains.

Then that sounds like a problem with those toolchains.

--

Re: portable way to get highest bit set?

<pan$de1e1$ef6860d0$f778ae52$f5591837@invalid.invalid>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29879&group=comp.lang.c#29879

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!bluemanedhawk.eternal-september.org!.POSTED!not-for-mail
From: bluemane...@invalid.invalid (Blue-Maned_Hawk)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 18:53:46 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <pan$de1e1$ef6860d0$f778ae52$f5591837@invalid.invalid>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<878r86rw6y.fsf@nosuchdomain.example.com>
<pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>
<ugd301$3ln97$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 14 Oct 2023 18:53:46 -0000 (UTC)
Injection-Info: bluemanedhawk.eternal-september.org; posting-host="046bb5a101b582feafc06d5d6b6b79b7";
logging-data="2886"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vO0cIxi4nCQFOCewHBfwMnBVITy+1iR0="
User-Agent: Pan/0.154 (Izium; 517acf4)
Cancel-Lock: sha1:qDnK80dN4msdrg5KRkCeVXLj4Xc=
X-Face: Llanfair­pwllgwyngyll­gogery­chwyrn­dro
bwll­llan­tysilio­ gogo­goch
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACh0lEQVRYw71Z21bD
MAzzevbfkr4cHjrSXJyL044+MDa6WLEl2SkvkrZ1AbAvXO+bUGSCPYnsuIVGMpm
ZLnjX718GhAKNsp8lON2F9VrhELwIgJlBepkZjA78rVK+FkmNhEJK76UsJlz8+E
rJsjrpYouhLo/SC6qPHgakFOR8wV9+8rCfO/I/oVnmUZUp42/LW2XkLj9TCFNM9
jp5g2EmHZgpYZjCOkYU7sXVogRylJqpdggoFLG1g09Flah/7kErCxzR9HgXPYsq
0glb9cxjIz2Vsk9AmAoCSxECpD713joMKjQqLAtmMqJmXjdVvlMnMQCVITotJd1
z+fh1f1NNo+vuc1KnhWUmY7t03vydTud9BbXCtN3L2PL3bK7JCNG0GHzuZxafyB
fxevCxpm1vrwZltqw6SILCcdoCE6PGQC8wZWDA9Or7Qp5s3lAZezys0nDazs9S9
R0TjwEiksRxLkNPC1NMMWPs1bj0Ei0Yuo+JVtFLuzP1NRJ16qXWN8DhhtmS4PDg
O6mqRxs4bEJrYt087mSIow/1VzW2oFlMQuiuIy/KsUagvhdw6hSjJGlIavbLF8x
j3X47bccLcUSi0dkWh1nUZNhANT1tHKUXrNxNLbd9KPb9wDDVrKwmPQMOPQ1oy6
k5I1DwzDeRJd3jVIhDAUxq3ngzJG4CCkNXZxZVMcjefoK2J0gUY2S3rxz/RuTFx
2zHd9U+obimJXMG4edsk/2j5pTU5G1MmzbRLxkfq5EiT1GGsidvMGzi+1goGb2l
GCrN+nGnV8xj3q3JLRDVPL96vUc7Z4aJ3TN1mVqWAMJMfG+Jxh6TQqP+92iZkCU
xtglds1AB6r0aiSHKcnFck+p/c/0CbacFLQcajGcAAAAASUVORK5CYII=
 by: Blue-Maned_Hawk - Sat, 14 Oct 2023 18:53 UTC

James Kuyper wrote:

> Many implementations have routinely chosen to remain "obsolete" for many
> years after a given version of the standard was approved.

That sounds like their problem.

--

Re: portable way to get highest bit set?

<ugf7cc$3k8v$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29885&group=comp.lang.c#29885

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 19:14:19 -0400
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <ugf7cc$3k8v$1@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<878r86rw6y.fsf@nosuchdomain.example.com>
<pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>
<ugd301$3ln97$1@dont-email.me>
<pan$de1e1$ef6860d0$f778ae52$f5591837@invalid.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Oct 2023 23:14:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2a2c5f024e48765cbee258bd6e287824";
logging-data="119071"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OKEzdJEtyordRyKluIT05KGxoVnun/Vk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:HPS2KO+9DjrLKgqr2Ks5UXQ1x4Y=
In-Reply-To: <pan$de1e1$ef6860d0$f778ae52$f5591837@invalid.invalid>
Content-Language: en-US
 by: James Kuyper - Sat, 14 Oct 2023 23:14 UTC

On 10/14/23 14:53, Blue-Maned_Hawk wrote:
> James Kuyper wrote:
>
>> Many implementations have routinely chosen to remain "obsolete" for many
>> years after a given version of the standard was approved.
>
> That sounds like their problem.

Code which requires support for more recent features of the C standard
isn't portable to those implementations, but that's not a problem for
them, because their customers don't feel a need to use those features.
It is, however, a problem for any claim that code using those features
is widely portable.

Re: portable way to get highest bit set?

<ugf7og$3ruq$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29886&group=comp.lang.c#29886

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 19:20:48 -0400
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <ugf7og$3ruq$1@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<878r86rw6y.fsf@nosuchdomain.example.com>
<pan$ccd5a$be70d7a6$e3ed688b$9880acc4@invalid.invalid>
<ugecsv$3u3so$1@dont-email.me>
<pan$b036e$461431b2$2bf7b043$d730da9d@invalid.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Oct 2023 23:20:48 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2a2c5f024e48765cbee258bd6e287824";
logging-data="126938"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Xbd9S/ZT9DSy4kNUnojoMtYR9l789oVw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VmPOuiFd/w/+XP967ZGf+qAVsIc=
In-Reply-To: <pan$b036e$461431b2$2bf7b043$d730da9d@invalid.invalid>
Content-Language: en-US
 by: James Kuyper - Sat, 14 Oct 2023 23:20 UTC

On 10/14/23 14:53, Blue-Maned_Hawk wrote:
> David Brown wrote:
....
>> But the vast majority of developers don't use the latest versions of
>> these tools. They use versions that come with their Linux distribution,
>> or mingw, or their microcontroller manufacturer's development tools, or
>> other pre-build toolchains.
>
> Then that sounds like a problem with those toolchains.

If the users of those toolchains aren't interested in using newer
versions, how is that a problem? Believe me, if a significant fraction
of their users do want support for a newer version of the standard, it
will be provided.

Re: portable way to get highest bit set?

<ugf7sv$3ruq$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29887&group=comp.lang.c#29887

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 19:23:11 -0400
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <ugf7sv$3ruq$2@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me>
<pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid>
<87h6mwu9rk.fsf@nosuchdomain.example.com>
<pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid>
<ugagv6$2vs64$1@dont-email.me>
<pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid>
<ugck5i$3faav$1@dont-email.me>
<pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid>
<ugd37f$3ln97$2@dont-email.me>
<pan$c64d0$8c0ed5b8$62596621$789ec9e7@invalid.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Oct 2023 23:23:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2a2c5f024e48765cbee258bd6e287824";
logging-data="126938"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JFRmY8IPyMVF4264V9i7WbvVzCJCy1J0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:KeTz0siIsv1fMstwzFiTvXvzkX0=
In-Reply-To: <pan$c64d0$8c0ed5b8$62596621$789ec9e7@invalid.invalid>
Content-Language: en-US
 by: James Kuyper - Sat, 14 Oct 2023 23:23 UTC

On 10/14/23 14:46, Blue-Maned_Hawk wrote:
> James Kuyper wrote:
....
>> It does if those systems are widely used, despite being "obsolete", as
>> is very often the case. Keep in mind that many of the people using these
>> systems would not consider them "obsolete" until they are at least two
>> or more versions behind the standard.
>
> Then it sounds like their definitions of obsoletion are pointless.

No, their definitions are tuned to their needs, which do not include
always using the latest version of the standard. They consider a version
of the standard obsolete only when it lacks a feature that's important
to them which was introduced in a newer version.

Re: portable way to get highest bit set?

<86h6msabgj.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29888&group=comp.lang.c#29888

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 19:03:40 -0700
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <86h6msabgj.fsf@linuxsc.com>
References: <ug5gvh$1jkar$3@dont-email.me> <20231011102714.44a870af4dfe68f756974953@g{oogle}mail.com> <ug6huc$1rvp1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="eb478ed0db5b06d993c3ccd040701c7e";
logging-data="311420"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QybmI7s56HuZqn5kf5lxtTPDBZ1tq4Vk="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:DCMs0BFty6bmGfMPLAF26s0t6co=
sha1:Pif46xw9usfN2XM0hk3qSaXpdQc=
 by: Tim Rentsch - Sun, 15 Oct 2023 02:03 UTC

candycanearter07 <no@thanks.net> writes:

> On 10/11/23 02:27, Anton Shepelev wrote:
>
>> candycanearter07:
>>
>>> What is the best/most portable way to get the highest bit
>>> set?
>>>
>>> ie. 011010001
>>> to 010000000
>>
>> What is your best attempt, even if unsuccessful?
>
> int out;
> for(out = 0x100000000; out; out >> 1)
> if(out & input) break;
>
> I'm trying to find something size independent, though.
> Or at least able to be swapped out with a #define

There have been several serious solutions posted
by now. Have you seen one that meets your needs?

Re: portable way to get highest bit set?

<86cyxgabe6.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29889&group=comp.lang.c#29889

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 19:05:05 -0700
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <86cyxgabe6.fsf@linuxsc.com>
References: <ug5gvh$1jkar$3@dont-email.me> <ug70cu$219ov$1@dont-email.me> <878r884vi5.fsf@bsb.me.uk> <ug86d3$2c9mp$1@dont-email.me> <87edi0qide.fsf@bsb.me.uk> <ug8r5q$2gqj4$1@dont-email.me> <ug9p1o$2nihu$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="eb478ed0db5b06d993c3ccd040701c7e";
logging-data="311420"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9btcAi9th22k+hXulnB6KblY2hca8crc="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:6xxNV4o9QnyVB9Rtu1ItzcsqeUQ=
sha1:RxYQiGRRrXTlyqMDYLekbx0nPJU=
 by: Tim Rentsch - Sun, 15 Oct 2023 02:05 UTC

jak <nospam@please.ty> writes:

> unsigned long h_bit(unsigned long val)
> {
> int i;
> for(i = 0; val > 1; val /= 2, i++);
> return val << i;
> }

A nice compact solution. I like the way it
naturally deals with the case when val is zero.

Re: portable way to get highest bit set?

<868r84aaen.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29890&group=comp.lang.c#29890

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 19:26:24 -0700
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <868r84aaen.fsf@linuxsc.com>
References: <ug5gvh$1jkar$3@dont-email.me> <20231011102714.44a870af4dfe68f756974953@g{oogle}mail.com> <ug6huc$1rvp1$1@dont-email.me> <86h6mxawqq.fsf@linuxsc.com> <20231012111100.272c96b3209baad26a150e55@g{oogle}mail.com> <86cyxkb2ka.fsf@linuxsc.com> <20231012141719.99f5a10ec921db3ee6f7d948@g{oogle}mail.com> <864jiwaqic.fsf@linuxsc.com> <20231012173021.0000149c@yahoo.com> <86v8bbanjv.fsf@linuxsc.com> <20231013021504.12623444fc7d7fdaab87f1e0@gmail.moc> <86mswm9mwk.fsf@linuxsc.com> <20231014015035.a51cbb621de8eea5ac6a8651@gmail.moc>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="eb478ed0db5b06d993c3ccd040701c7e";
logging-data="311420"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uozYgTo4gd6g8vrUJJQNVnbsVoWDhioY="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:RGgvyWHKmGI5MrRY2feiA+IM+Z4=
sha1:sVG8kIb6GR/4bZU/vBQL8CRGxws=
 by: Tim Rentsch - Sun, 15 Oct 2023 02:26 UTC

Anton Shepelev <anton.txt@gmail.moc> writes:

> Tim Rentsch:
>
>> Before giving any comment on the algorithm, I'd like to
>> ask a question about layout style. Your code follows the
>> unusual practice of starting controlled blocks with an
>> open brace at the start (possibly indented) of a line, and
>> the first code line of the block on the same line as the
>> open brace. Is this practice something you started by
>> yourself, or did you see it and adopt it from somewhere
>> else? What kinds of reasons persuaded you to follow it?
>
> I was bothered by the unaligned braces in K&R and by the
> too-sparse look of the opening brace on a line of its own.
> When a friend of mine was working on a coding style
> guide[1], he researched exising indentaion styles and told
> me about them, including Horstmann:
>
> <https://en.wikipedia.org/wiki/Indentation_style#Horstmann_style>
>
> whence I took the main idea of placing braces.

Thank you for the explanation. I myself would never
use this layout style but I try to understand why
other people makes the choices they do.

I should be responding again, hopefully soonish, to your post
upthread to say something about that code.

Re: portable way to get highest bit set?

<864jisaaa8.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29891&group=comp.lang.c#29891

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 19:29:03 -0700
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <864jisaaa8.fsf@linuxsc.com>
References: <ug5gvh$1jkar$3@dont-email.me> <20231011102714.44a870af4dfe68f756974953@g{oogle}mail.com> <ug6huc$1rvp1$1@dont-email.me> <86h6mxawqq.fsf@linuxsc.com> <20231012111100.272c96b3209baad26a150e55@g{oogle}mail.com> <86cyxkb2ka.fsf@linuxsc.com> <20231012141719.99f5a10ec921db3ee6f7d948@g{oogle}mail.com> <864jiwaqic.fsf@linuxsc.com> <20231012183135.a6faa3027ccac0820b24ad96@g{oogle}mail.com> <86r0ly9n77.fsf@linuxsc.com> <20231014012644.e479ae5d69d5826e0e6ba474@gmail.moc>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="eb478ed0db5b06d993c3ccd040701c7e";
logging-data="311420"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0SnzXZd2/L2XqhhY/zmqfyF5NHMmoe3A="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:HTgI0WmSVxR4TxkWXHo1Ru56nKI=
sha1:Sgz7qGSzTsBEwzZbam2hFIwx840=
 by: Tim Rentsch - Sun, 15 Oct 2023 02:29 UTC

Anton Shepelev <anton.txt@gmail.moc> writes:

> Tim Rentsch about my code:
>
>> I'm at a loss for words.
>
> What, no one did worse?

It was just too much work to figure out something
useful to say. So all I could think of was to
say I'm at a loss as to how to respond.

Re: portable way to get highest bit set?

<86zg0k8u3l.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29892&group=comp.lang.c#29892

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sat, 14 Oct 2023 20:03:58 -0700
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <86zg0k8u3l.fsf@linuxsc.com>
References: <ug5gvh$1jkar$3@dont-email.me> <pan$e0805$faa9a91a$a60476dc$4a90cfa8@invalid.invalid> <87h6mwu9rk.fsf@nosuchdomain.example.com> <pan$325f3$70a576a8$3150c04a$26db7b31@invalid.invalid> <ugagv6$2vs64$1@dont-email.me> <pan$21acb$49c8a2a6$a1bbf038$1e40c8f0@invalid.invalid> <ugck5i$3faav$1@dont-email.me> <pan$19122$eaff5f26$f64222cd$d70e555c@invalid.invalid> <ugd37f$3ln97$2@dont-email.me> <pan$c64d0$8c0ed5b8$62596621$789ec9e7@invalid.invalid>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="eb478ed0db5b06d993c3ccd040701c7e";
logging-data="328631"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Dl1gIjDf9W7qj7R6VXjq//yWCj/W0M8U="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:SFY0EKcxB42qjyVhSsYRBmkiQ4w=
sha1:NfkqCUdJFODrwt1OfqvQrmBXv2c=
 by: Tim Rentsch - Sun, 15 Oct 2023 03:03 UTC

Blue-Maned_Hawk <bluemanedhawk@invalid.invalid> writes:

> James Kuyper wrote:
>
>> On 10/13/23 22:15, Blue-Maned_Hawk wrote:
>>
>>> <snip/>
>>>
>>> Portability to obsolete systems does not matter.
>>
>> It does if those systems are widely used, despite being "obsolete",
>> as is very often the case. Keep in mind that many of the people
>> using these systems would not consider them "obsolete" until they
>> are at least two or more versions behind the standard.
>
> Then it sounds like their definitions of obsoletion are pointless.

The word obsolete means no longer used or no longer useful. If
someone is still using it then by definition it is not obsolete.

Re: portable way to get highest bit set?

<ugfo4p$ameh$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=29893&group=comp.lang.c#29893

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nos...@please.ty (jak)
Newsgroups: comp.lang.c
Subject: Re: portable way to get highest bit set?
Date: Sun, 15 Oct 2023 06:00:24 +0200
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <ugfo4p$ameh$1@dont-email.me>
References: <ug5gvh$1jkar$3@dont-email.me> <ug70cu$219ov$1@dont-email.me>
<878r884vi5.fsf@bsb.me.uk> <ug86d3$2c9mp$1@dont-email.me>
<87edi0qide.fsf@bsb.me.uk> <ug8r5q$2gqj4$1@dont-email.me>
<ug9p1o$2nihu$1@dont-email.me> <86cyxgabe6.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 15 Oct 2023 04:00:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e564dff263fcef672c2d3b215519151a";
logging-data="350673"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6U+yQkBxnSjPMHNCiZKTe"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:IG03omV8Mf6wrvABR/8qGqyY4Y4=
In-Reply-To: <86cyxgabe6.fsf@linuxsc.com>
 by: jak - Sun, 15 Oct 2023 04:00 UTC

Tim Rentsch ha scritto:
> jak <nospam@please.ty> writes:
>
>> unsigned long h_bit(unsigned long val)
>> {
>> int i;
>> for(i = 0; val > 1; val /= 2, i++);
>> return val << i;
>> }
>
> A nice compact solution. I like the way it
> naturally deals with the case when val is zero.
>

This is not true because if Val is 0 also the bit shifted to left is,
so also its result is 0. This one of the reason why the exit from the
loop is greater than 1.


devel / comp.lang.c / Re: portable way to get highest bit set?

Pages:12345678
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor