From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8611 invoked from network); 15 May 2022 14:46:32 -0000 Received: from tb-ob1.topicbox.com (64.147.108.173) by inbox.vuxu.org with ESMTPUTF8; 15 May 2022 14:46:32 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob1.topicbox.com (Postfix) with ESMTP id CDE6F2E97B for ; Sun, 15 May 2022 10:46:27 -0400 (EDT) (envelope-from bounce.mMa63068d9d401c85e69d9d87f.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id CB5AA23FF55C; Sun, 15 May 2022 10:46:27 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:to:subject:date:from:in-reply-to :mime-version:content-type:content-transfer-encoding:list-help :list-id:list-post:list-subscribe:reply-to:list-unsubscribe; s= sysmsg-1; t=1652625987; bh=G8KIqCxYBr2NI3UQK4PknjWMWKCKpg3wH2INp w6h468=; b=W+jtZupZFOlx2lmEAWEtf8+ZWZvbGEd0zXpWKmzpN3ske5W97BfRu gC9Sqh7TSSUYQx5PfSdRVOKz8D3+rLTrnMuGw2X/Z+u9cUzsplRoxS4hLQvGgJ7M HFhh4iIa0G+h2hfoUZCW4ojF+QqZ32fvsoZxmBjzC4+FnWVHpl7R40= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1652625987; b=b+gygJVoWr9mLkuYPOnQ5ry4FwiEGOV4F4lZzoENsu21acCdvJ ssxbar9KbCGzZvlkQMXRYK2oKZUGdW1yL2vW9RaFH+ppH42KRw4oGc9C2nvx6eLX laXVbFQQPQ8IQBR4VrXE4bSop9fmrlar5P2Ry7btK1uCcIZ2MC+Kyx4U0= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; iprev=pass smtp.remote-ip=206.124.132.107 (mimir.eigenstate.org); spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mimir.eigenstate.org policy.ptr=mimir.eigenstate.org; x-return-mx=pass header.domain=eigenstate.org policy.is_org=yes (MX Records found: kusuri.pikopiko.org,mail.pikopiko.org,eigenstate.org,nokogiri.pikopiko.org); x-return-mx=pass smtp.domain=eigenstate.org policy.is_org=yes (MX Records found: kusuri.pikopiko.org,mail.pikopiko.org,eigenstate.org,nokogiri.pikopiko.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=message-id :to:subject:date:from:in-reply-to:mime-version:content-type :content-transfer-encoding:list-help:list-id:list-post :list-subscribe:reply-to:list-unsubscribe; s=dkim-1; bh=0/dtdWFz SxKjwWe2MJHbIj/OvY5v8iLH+a2Lb54dZo8=; b=bF0emBYurvFCF0nV4ONBHtwr fEvvEtpvaDNnJ3TPzs9z7WnClfzLVGv3PGMQDa6+AbvnBXTF7na1zJLxFjdnFGwo UJxDZRAi3LFbfozBV6JIdf0icbuX8fc7i7zr3h2H4WgMItDuJOtuGjl3i8iqQ90Q RfmAGXI8sahgwLPSLos= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id 4392C148A2D9 for <9fans@9fans.net>; Sun, 15 May 2022 10:46:15 -0400 (EDT) (envelope-from ori@eigenstate.org) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id DCAA63F6F00; Sun, 15 May 2022 10:46:15 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1652625975; b=DuANhfOIbVtjSBK4p23HzA9zlASbegVT0aSzG4avMPGRO/LpTP tFuq7OodfsLfWyCrjn2MzhimPkeQ19aIy3dypNc1JzVfcXb9h91nKAf3Tozhmljk meJqQ/Kqt9TsoPQKblENTspstN/98MD0c9u+FpH2FsrGSGj5xi8Ao2w+6l6/o46y +iCe7DGb1UM3byExfqg9WIXgG6VoTkkAg/P4qilQ1PNMi8BCr+zWfR7UjlkbmuTh 9AC/uyzzLm/G3vNUTBQBL4vVpAVal8TtqqjN/7yGygLRsZ1yL01le0ix1XHbD1GE eUr/Ousd3sRDmMpm5sx2nMliqfuOasMTJiHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:to:subject:date:from:in-reply-to :mime-version:content-type:content-transfer-encoding; s=arcseal; t=1652625975; bh=2E5d4ugGERzn0PUDy4yUfXeyGT8yRXXrt3/gwMd6YOY=; b= i1nllySRkhYnzmyAmpdXLAosyn1bCHeluAKXXarJAa9BngG0CCYPsMySf18YXVPm 8V8Tmvse9T7k33wcA6s7f2AQLPIpUOSrvNFbRFewZ6BXnzGSglX4wSwCXVY2+VWL k6uiMB6Xg5lxgRMT/I0DpFtZDsp11msd7Dl+Im23GxzNV3TSsqta/wUOTO/9ltAk y6gn02n8r6SzjUg6BTGl7w6pDyR9n5lHGfcy+RlMWIyDPtA3WC0tyGHR4rGW0K6t uzjC4RLBj1iwgEUowjM1jLtMCPIZ0qM+HVn3SE2bwQ7Wtq9qA+rUUJ3e4SRV91na j7alGgS1w/eHQeflMN3hSg== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; iprev=pass smtp.remote-ip=206.124.132.107 (mimir.eigenstate.org); spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mimir.eigenstate.org policy.ptr=mimir.eigenstate.org; x-return-mx=pass header.domain=eigenstate.org policy.is_org=yes (MX Records found: kusuri.pikopiko.org,mail.pikopiko.org,eigenstate.org,nokogiri.pikopiko.org); x-return-mx=pass smtp.domain=eigenstate.org policy.is_org=yes (MX Records found: kusuri.pikopiko.org,mail.pikopiko.org,eigenstate.org,nokogiri.pikopiko.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvfedrheefgdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkffvufffhf gjgggtgfesthejjedttddtvdenucfhrhhomhepohhrihesvghighgvnhhsthgrthgvrdho rhhgnecuggftrfgrthhtvghrnhepvdehtdeffeetgeelhfegkeehhfeuhfehvddvieduue ehjeetgeevkeeitdevuefhnecukfhppedvtdeirdduvdegrddufedvrddutdejpdejgedr uddtkedrheeirddvvdehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinh gvthepvddtiedruddvgedrudefvddruddtjedphhgvlhhopehmihhmihhrrdgvihhgvghn shhtrghtvgdrohhrghdpmhgrihhlfhhrohhmpeeoohhrihesvghighgvnhhsthgrthgvrd horhhgqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (eigenstate.org: 206.124.132.107 is authorized to use 'ori@eigenstate.org' in 'mfrom' identity (mechanism 'mx' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="ori@eigenstate.org"; helo=mimir.eigenstate.org; client-ip=206.124.132.107 Received: from mimir.eigenstate.org (mimir.eigenstate.org [206.124.132.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sun, 15 May 2022 10:46:14 -0400 (EDT) (envelope-from ori@eigenstate.org) Received: from abbatoir.myfiosgateway.com (pool-74-108-56-225.nycmny.fios.verizon.net [74.108.56.225]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 3950d66c (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9fans@9fans.net>; Sun, 15 May 2022 07:46:13 -0700 (PDT) Message-ID: To: 9fans@9fans.net Subject: Re: [9fans] void* Date: Sun, 15 May 2022 10:46:11 -0400 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: c881ceb2-d45d-11ec-8fa3-b4c1c1d42616 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZWNhZWEzYjllYzhlNzA2Ni1NYTYzMDY4ZDlkNDAxYzg1ZTY5ZDlk?= =?UTF-8?B?ODdmPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Ma63068d9d401c85e69d9d87f:1:6d1GtVeyUaNNWqwJVXITM49iV5EECr-qZgwtReQJwss Quoth adr : > 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. >=20 arithmetic on void* is a gnu extension. It also implies sizeof(void) =3D=3D 1; this is indeed true with gcc. I also don't think it's useful enough to add a special case to an already special case: it's rare to be able to do pointer arithmetic on void and *not* access the memory, in my experience. > It wouldn't make more sense to avoid the use of void* > and just use instead uchar* or better still u8int*? the unique thing about void* is that there is an implicit conversion from any pointer type to void*; there is not for uchar* or u8int*. memset((u8int*)&x, 0, sizeof(x)); seems unnecessarily clunky. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tecaea3b9ec8e7066-Ma6306= 8d9d401c85e69d9d87f Delivery options: https://9fans.topicbox.com/groups/9fans/subscription