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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20544 invoked from network); 15 May 2022 12:12:02 -0000 Received: from tb-ob1.topicbox.com (64.147.108.173) by inbox.vuxu.org with ESMTPUTF8; 15 May 2022 12:12:02 -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 B097A2D064 for ; Sun, 15 May 2022 08:11:57 -0400 (EDT) (envelope-from bounce.mMe2a3b163527df44b207e4fc3.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id AD34C23F6F63; Sun, 15 May 2022 08:11:57 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=g30vVdn8 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=hummsmith42@gmail.com smtp.helo=mail-ed1-f43.google.com; 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=date:from:to:subject:message-id:references :mime-version:content-type:content-transfer-encoding:in-reply-to :list-help:list-id:list-post:list-subscribe:reply-to :list-unsubscribe; s=sysmsg-1; t=1652616717; bh=kUtgcwNwIP+PtlT3 mhVQpZ9Trew6wLbMEu8SzSfz4aA=; b=Y2kzx1R3uQvnonYjQxvGaQJHR/7WQNQ1 8+pY/VCRXOvlQaDDaScMVu7T891huJvouGVQXdMkAPzGfCg022wDq3RYXi6qpiwl cxfAQ9ftHGaB0LLSIKPZjalClodT1jmH04Rn5eqWGZaB1TrrsxlqUyg9VOBG13at R40Kjp5zw0M= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1652616717; b=qlk2DqPq5b4twiUMFGUa8NxDfkF1WL8IWYEjygpiygSQq9weQa pM36lcOyFg+hHOh3Aq3zj49lyLOotFyg5YV84jwkt9M+0+3hT86tK1RupdaZPlY+ 5ZuhKPnS+zoYJFkfUBI87HbYm61lMvr9jLqNmJT55/DtYQ9ziM1ijJY7k= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=g30vVdn8 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=hummsmith42@gmail.com smtp.helo=mail-ed1-f43.google.com; 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-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=g30vVdn8 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.208.43 (mail-ed1-f43.google.com); spf=pass smtp.mailfrom=hummsmith42@gmail.com smtp.helo=mail-ed1-f43.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=18lKTNNV; x-me-sender=none; x-ptr=pass smtp.helo=mail-ed1-f43.google.com policy.ptr=mail-ed1-f43.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); 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=date:from :to:subject:message-id:references:mime-version:content-type :content-transfer-encoding:in-reply-to:list-help:list-id :list-post:list-subscribe:reply-to:list-unsubscribe; s=dkim-1; bh=6pyEFn/O1ItHR+Tm7/n8sq+EUdppspYRMMOZSJMdRrk=; b=EtzcLvQuuGT6 zgiMOUppU1vv3sOA1aW/Klhm+soaM6sm2ryfEMNa1Z6YoafDgbZQ9PyP5FgS0pBM YwxDtM5G6ZZ+3PCouoo6RoWp9YEk3ROWzcac46FOm3APEFocBC9F6Xe0OR0dlrG5 8iZCWAkCrmv86gWluT8BI/88SAysjPU= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id 019DC23F6B4F for <9fans@9fans.net>; Sun, 15 May 2022 08:11:45 -0400 (EDT) (envelope-from hummsmith42@gmail.com) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 76477041528; Sun, 15 May 2022 08:11:45 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1652616705; b=FXzBqWeiKbCxnCcQXnrgty/3RLTEC7d8sQM67GOa28DunwgYzX dBmVvHRaeTlc/oi5JN6Tp5h7KOkEsKpK05c2fa7DZUHTfz2C/v6vyXq2KuD5Gfrm ZW3kZHujPC2oIlwXqiLSHUW+5cw+dk8FtMFlnQh7iaJK6JJP3/750YoBALthewAI K7tkM/i8HcFS57q5a84gbM4T0zh5mZfFKXmW1Ufjr2OATRi/4B78oj5Mqd7OBaxH P9x/RH3XFFMkiYmAlO/BGOlRhoqfUma2W4LhFsMXxV0if41uEPWkO7OhrYzGFIkK LylTAcCs6KwF/kI24aB5WxMtEXwToYTxScig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:subject:message-id:references :mime-version:content-type:content-transfer-encoding :in-reply-to; s=arcseal; t=1652616705; bh=T7w0rfS6vrmIfDDA8hbVlG agIjw5jZO6la4A2XonjDY=; b=N0r5C3onyFzkZufN84H1NdKS4uCi/7C+zhjuHN gorAC05HRcW5kEqt1iez+xBJAG88nOw/xHqkaINvrrPB+sjrtSfPbjwu3VdBFDuC /9VcxamFO4YNjOI5p/mlwNPznLLPLhAiGIbZohG0Xh2aIwseYRX5asbaRst2Mss+ bGD/M1yj61WA6wNnQdohk3z9fIoa/lNrlcXUQwY833gBeLcKVpWF2D4p/af8p/EQ a+5Mx2+uyQrPjU04/Quf0DiCUz8nanKI/AjgvStKVBarusowZW9Dz445ZilCfjRa b+d8X7nNVKEryOG2y0VdYD68UjdhkPCm/v2YiAaV+89nTKhA== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=g30vVdn8 header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.208.43 (mail-ed1-f43.google.com); spf=pass smtp.mailfrom=hummsmith42@gmail.com smtp.helo=mail-ed1-f43.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=18lKTNNV; x-me-sender=none; x-ptr=pass smtp.helo=mail-ed1-f43.google.com policy.ptr=mail-ed1-f43.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); 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: gggruggvucftvghtrhhoucdtuddrgedvfedrheefgdeglecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukf hfgggtugfgjgesthektddttddtjeenucfhrhhomhepjfhumhhmuceohhhumhhmshhmihht hhegvdesghhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepieetvdegjefhtdekue eitdduffekfeejgeffudejgeeivefhhefhleelkeeijeetnecukfhppedvtdelrdekhedr vddtkedrgeefpdelhedrfeefrddvvdejrdduheejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehinhgvthepvddtledrkeehrddvtdekrdegfedphhgvlhhopehmrghi lhdqvgguuddqfhegfedrghhoohhglhgvrdgtohhmpdhmrghilhhfrhhomhepoehhuhhmmh hsmhhithhhgedvsehgmhgrihhlrdgtohhmqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'hummsmith42@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="hummsmith42@gmail.com"; helo=mail-ed1-f43.google.com; client-ip=209.85.208.43 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sun, 15 May 2022 08:11:45 -0400 (EDT) (envelope-from hummsmith42@gmail.com) Received: by mail-ed1-f43.google.com with SMTP id d6so15054411ede.8 for <9fans@9fans.net>; Sun, 15 May 2022 05:11:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=T7w0rfS6vrmIfDDA8hbVlGagIjw5jZO6la4A2XonjDY=; b=18lKTNNV2MVfv7nxGVhNorMzHzZhKQK+S0kAdY+T5as5eiFogLQXnhD4gFLa9sLbuC CPJDJdVuUKnITbMBmSp9NdxzT/mqYp7jlAMId1X8bRpLN5A8/2GdZSttl+ofKzCLLurz rmZx9moxsux7ZQYHZCa3hCuNtQzNU/j5mrHnO0SpalLZN4rYpQe8LkScY16b0J5Fvzr7 ueodqSCosq80U7iqvnzDfGSluLesI66+bsyG8MXuf0Jh8SS8GrZpVoDdp4ynjAlSjtLI s9VFxi3OeEbQze6lskOustNXv6GCxMhskMdDRQMvd4n6AZK+6h/cAeFJzdVD98K20cly Wz4w== X-Gm-Message-State: AOAM530eiPviC8dLxDKmgFh97PKR31vVDamhkx2jRPuYJLSKkrIkR5NP uoFUjsdDVZJ3J7eEC3+16xWzqb30tnU= X-Google-Smtp-Source: ABdhPJz2foMmGE219T0T+89s+k3RsoIUvuoUXwKQUwoVmu8AmJfivIPQbqDP2LUBP9PkRVbXSBdsHw== X-Received: by 2002:a05:6402:31fc:b0:428:5da9:be6a with SMTP id dy28-20020a05640231fc00b004285da9be6amr8175874edb.223.1652616704130; Sun, 15 May 2022 05:11:44 -0700 (PDT) Received: from beryllium.local (dyndsl-095-033-227-157.ewe-ip-backbone.de. [95.33.227.157]) by smtp.gmail.com with ESMTPSA id ek27-20020a056402371b00b0042617ba63c0sm3446015edb.74.2022.05.15.05.11.43 for <9fans@9fans.net> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 05:11:43 -0700 (PDT) Received: from localhost (beryllium.local [local]) by beryllium.local (OpenSMTPD) with ESMTPA id 04d991ed for <9fans@9fans.net>; Sun, 15 May 2022 14:11:35 +0200 (CEST) Date: Sun, 15 May 2022 12:11:35 +0000 From: Humm To: 9fans <9fans@9fans.net> Subject: Re: [9fans] void* Message-ID: Mail-Followup-To: 9fans <9fans@9fans.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 332d7ea2-d448-11ec-8441-ccca3654375e Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZWNhZWEzYjllYzhlNzA2Ni1NZTJhM2IxNjM1MjdkZjQ0YjIwN2U0?= =?UTF-8?B?ZmMzPg==?= 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:Me2a3b163527df44b207e4fc3:1:41BH2R7wv-S_utimYcArBPv6QKd2S-rt7st3St42aAM >one of the first thing I noticed compiling in plan9 is that arithmetic=20 >on void* is illegal. That=E2=80=99s what the standard says. While Plan 9 C doesn=E2=80=99t pretend to be compliant, the core language d= oes=20 roughly match C89 with a few C99 extensions. >Other compilers treat void* as uchar*. Conceptually, it makes sense.=20 >A pointer to void doesn't point to any object. But then I've seen the=20 >use of void* in functions (like memccpy) when the pointed object is=20 >going to be processed as a byte array. Local uchar*'s are used to do=20 >the trick inside the function. > >It wouldn't make more sense to avoid the use of void* and just use=20 >instead uchar* or better still u8int*? (Those are different. On Plan 9, we do make (too many) assumptions=20 about type sizes, but conceptually, a byte need not be limited to eight=20 bit.) I=E2=80=99m now quoting the C99 Rationale (revision 5.10). Page 37, =C2=A7 6.2.5: >A pointer to void must have the same representation and alignment as=20 >a pointer to char; the intent of this rule is to allow existing=20 >programs that call library functions such as memcpy and free to=20 >continue to work. Page 48, =C2=A7 6.3.2.3: >The use of void* (=E2=80=9Cpointer to void=E2=80=9D) as a generic object p= ointer type=20 >is an invention of the C89 Committee. Adoption of this type was=20 >stimulated by the desire to specify function prototype arguments that=20 >either quietly convert arbitrary pointers (as in fread) or complain if=20 >the argument type does not exactly match (as in strcmp). --=20 Humm ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tecaea3b9ec8e7066-Me2a3b= 163527df44b207e4fc3 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription