From patchwork Thu Oct 1 15:49:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40591 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C7282398B846; Thu, 1 Oct 2020 15:50:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7282398B846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1601567409; bh=vcW+t6xj9+Dm4yGVPjVNhDwJEHalSJR6T9zUqBAu4Rw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=L4/hwuOupWceMWEBGOKrp+h13f0E2vXuatMWaecdBZEw/FGbvI6kF57aRGh0oE/12 CJonoRZwER4b1dEjgraEhX0FC38yNjrD2s40Z7xOVSiTssM+EC8TTdJhMVs/KczHxK hX81QyPl8nzq3gD/VvhXtkQMnh9eK4p4DRkAq0oE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by sourceware.org (Postfix) with ESMTPS id BCF5F386EC32 for ; Thu, 1 Oct 2020 15:50:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BCF5F386EC32 Received: by mail-wr1-x441.google.com with SMTP id g4so6395167wrs.5 for ; Thu, 01 Oct 2020 08:50:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vcW+t6xj9+Dm4yGVPjVNhDwJEHalSJR6T9zUqBAu4Rw=; b=PF+Sw9PZY4k+Ap30pL1eyZvmrCauTlY6ZZ0g8bwZ7ZHxrigABR9et4Gm2yRL2E1ovH OfPUPK5nSErSAdiKz1Sqggh51G75Rr4y0gcr6713ioHZRdBiBeAVCmtBC0vM4maTZnyP +2rqW+XqR6SC+9ZmpU204/06UJ/F95i5FjWDzGQ7ix0ZnP+8ZWOdY4yK7E5vQ1YyVPqM bGYOFTsk+AsCQPSkjQ6YM5ovIkL4qSh/yHuSKJKNz95iIG2q2uDweK1L953Vb8nG5fon vLFrUuhZsv2S0Y85OxPktZbxR/YcN0uIfYd8HhUkneLGOa8oX48s2rzZRYxErsgad+hC b5kg== X-Gm-Message-State: AOAM530PG8D6LoHtHq/d3VUQ30I6Kz9GEzga+heGjjtsCDRGFFJ3TMlp Cgda9eRPZ9iaezAep/rF8mQ= X-Google-Smtp-Source: ABdhPJwg/JUDQuAPMpnQlxK9ShXzdnvIL21BuoVwwRV5Njhao/aGeME2A+Y+1dFJHy6MT6iYt4sZhg== X-Received: by 2002:a5d:5090:: with SMTP id a16mr10409341wrt.247.1601567404681; Thu, 01 Oct 2020 08:50:04 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id t4sm10019933wrr.26.2020.10.01.08.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 08:50:04 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 1/2] system_data_types.7: Add 'void *' Date: Thu, 1 Oct 2020 17:49:46 +0200 Message-Id: <20201001154946.104626-2-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <41affebd-3354-9420-0048-bffd14535e95@gmail.com> References: <41affebd-3354-9420-0048-bffd14535e95@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org, gcc@gcc.gnu.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man7/system_data_types.7 | 47 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/man7/system_data_types.7 b/man7/system_data_types.7 index e42cf2557..e545aa1a0 100644 --- a/man7/system_data_types.7 +++ b/man7/system_data_types.7 @@ -679,7 +679,6 @@ See also the .I uintptr_t and .I void * -.\" TODO: Document void * types in this page. .RE .\"------------------------------------- lconv ------------------------/ @@ -1781,7 +1780,6 @@ See also the .I intptr_t and .I void * -.\" TODO: Document void * types in this page. .RE .\"------------------------------------- va_list ----------------------/ @@ -1815,6 +1813,51 @@ See also: .BR va_copy (3), .BR va_end (3) .RE +.\"------------------------------------- void * -----------------------/ +.TP +.I void * +.RS +According to the C language standard, +a pointer to any object type may be converted to a pointer to +.I void +and back. +POSIX further requires that any pointer, +including pointers to functions, +may be converted to a pointer to +.I void +and back. +.PP +Conversions from and to any other pointer type are done implicitly, +not requiring casts at all. +.PP +A value of this type can't be dereferenced, +as it would give a value of type +.I void +which is not possible. +.PP +The conversion specifier for +.I void * +for the +.BR printf (3) +and the +.BR scanf (3) +families of functions is +.BR p ; +resulting commonly in +.B %p +for printing +.I void * +values. +.PP +Conforming to: +C99 and later; POSIX.1-2001 and later. +.PP +See also the +.I intptr_t +and +.I uintptr_t +types in this page. +.RE .\"--------------------------------------------------------------------/ .SH NOTES The structures described in this manual page shall contain,