From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id 1532F3894E6F for ; Tue, 19 May 2020 11:07:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1532F3894E6F Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-496-iMEGyER4PkqjUsjuwiPexw-1; Tue, 19 May 2020 07:07:27 -0400 X-MC-Unique: iMEGyER4PkqjUsjuwiPexw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BAE7684634C; Tue, 19 May 2020 11:07:26 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-113-18.ams2.redhat.com [10.36.113.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9D0966EA32; Tue, 19 May 2020 11:07:25 +0000 (UTC) From: Florian Weimer To: Jonathan Wakely via Gcc-help Cc: =?utf-8?B?0JjQs9C+0YDRjCDQk9C+0YDQu9C+0LI=?= , Jonathan Wakely Subject: Re: Invalid use of 'void' References: <12029271589797822@iva7-8a22bc446c12.qloud-c.yandex.net> <3ba570d4-e88b-3ece-d00a-771f8f8e7207@gmail.com> Date: Tue, 19 May 2020 13:07:24 +0200 In-Reply-To: (Jonathan Wakely via Gcc-help's message of "Mon, 18 May 2020 21:03:26 +0100") Message-ID: <87imgsi3o3.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2020 11:07:31 -0000 * Jonathan Wakely via Gcc-help: > And G++ does allow arithmetic involving a void* and an integer, e.g. > p1 - 32 or p2 + 64, it doesn't allow subtracting one void* from the > other. So the extension is only partially supported for C++. We should > probably document that. And it's a regression, GCC 2.7.2.3 can compile it, but GCC 2.95.2 cannot. (Of course, I'm only half-serious here.) The problem I see with such extensions in C++ is that they could alter SFINAE outcomes. But maybe that's less important these days because people don't write custom type traits anymore. Thanks, Florian