9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] void*
@ 2022-05-15 10:58 adr
  2022-05-15 12:11 ` Humm
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: adr @ 2022-05-15 10:58 UTC (permalink / raw)
  To: 9fans

Hi,
one of the first thing I noticed compiling in plan9 is that arithmetic
on void* is illegal. Other compilers treat void* as uchar*.
Conceptually, it  makes sense. A pointer to void doesn't point to
any object. But then I've seen the use of void* in functions (like
memccpy) when the pointed object is going to be processed as a
byte array. Local uchar*'s are used to do the trick inside the
function.

It wouldn't make more sense to avoid the use of void*
and just use instead uchar* or better still u8int*?

Some thoughts?

Regards,
adr.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tecaea3b9ec8e7066-M7d5d7a58e7e77b74d2aa123a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-05-17  4:00 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-15 10:58 [9fans] void* adr
2022-05-15 12:11 ` Humm
2022-05-15 13:03   ` adr
2022-05-15 13:15     ` adr
2022-05-15 13:21       ` arnold
2022-05-15 14:09         ` adr
2022-05-15 14:47           ` ori
2022-05-15 15:49             ` adr
2022-05-15 15:23       ` Dan Cross
2022-05-15 15:50         ` Bakul Shah
2022-05-15 15:54           ` ori
2022-05-15 14:46 ` ori
2022-05-15 16:07 ` adr
2022-05-16  6:24   ` Skip Tavakkolian
2022-05-16 12:46     ` Humm
2022-05-16 13:23     ` Bakul Shah
2022-05-16 14:46 ` Charles Forsyth
2022-05-16 16:03   ` adr
2022-05-16 17:45     ` hiro
2022-05-17  4:00       ` Lucio De Re

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).