From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3A9441F4B4 for ; Tue, 12 Jan 2021 18:25:46 +0000 (UTC) Received: from localhost ([::1]:52608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzOMS-0007AE-TW for normalperson@yhbt.net; Tue, 12 Jan 2021 13:25:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzOKr-0005Zt-TV for bug-gnulib@gnu.org; Tue, 12 Jan 2021 13:24:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:42211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kzOKo-00033l-Mx for bug-gnulib@gnu.org; Tue, 12 Jan 2021 13:24:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610475841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=maJLmoNn3PiMGBaU4H19bcpoMwC6X3FgcCdSJ5t5oiY=; b=J+Vch9qtIr+YLvFnSI1JESmys2SFgZliXiLB7/m1RmVt1f0X1zOEJmHfYqi0R7nQeHZ3kE TIdfSMZ0F8MjPQqLrskE1o/mnawughUzOW6qUS/ubCEw5Ay/qJop+cuysKwoQf4rsAJJvd JskNVMF/NLXofoDMXcnIsdxx7MwQ8zw= 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-262-HBR4HepIPp-FxVTHJURiNg-1; Tue, 12 Jan 2021 13:23:58 -0500 X-MC-Unique: HBR4HepIPp-FxVTHJURiNg-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 9C9D61006C81; Tue, 12 Jan 2021 18:23:57 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-114-67.ams2.redhat.com [10.36.114.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5FCCF5B692; Tue, 12 Jan 2021 18:23:56 +0000 (UTC) From: Florian Weimer To: Alexandre Duret-Lutz Subject: Re: clang++ 11 compilation issues References: <87k0sixwya.fsf@lrde.epita.fr> Date: Tue, 12 Jan 2021 19:23:54 +0100 In-Reply-To: <87k0sixwya.fsf@lrde.epita.fr> (Alexandre Duret-Lutz's message of "Tue, 12 Jan 2021 11:37:33 +0100") Message-ID: <87im82f1z9.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=fweimer@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Received-SPF: pass client-ip=63.128.21.124; envelope-from=fweimer@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.251, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" * Alexandre Duret-Lutz: > (1) lib/argmatch.h includes lib/gettext.h which fails as follows > >> clang++ -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../buddy/src -I../lib -I../lib -W -Wall -Werror -Wint-to-void-pointer-cast -Wzero-as-null-pointer-constant -Wcast-align -Wpointer-arith -Wwrite-strings -Wcast-qual -DXTSTRINGDEFINES -Wdocumentation -Wmissing-declarations -Woverloaded-virtual -Wmisleading-indentation -Wimplicit-fallthrough -Wnull-dereference -Wsuggest-override -Wpedantic -fvisibility=hidden -fvisibility-inlines-hidden -DSPOT_BUILD -std=c++17 -g -O -MT autcross.o -MD -MP -MF .deps/autcross.Tpo -c -o autcross.o autcross.cc >> In file included from autcross.cc:34: >> In file included from ../lib/argmatch.h:31: >> ../lib/gettext.h:234:22: error: zero as null pointer constant [-Werror,-Wzero-as-null-pointer-constant] >> if (msg_ctxt_id != NULL) >> ^~~~ >> nullptr >> /usr/lib/llvm-11/lib/clang/11.0.1/include/stddef.h:84:18: note: expanded from macro 'NULL' >> # define NULL __null >> ^ Would you be able to check whether __null is in the preprocessed sources? If it is there (and the lack of further logged expansions suggests this), then this is a compiler bug. __null is not zero, and should be fine to use as a null pointer constant. This is why NULL is not defined as 0. Thanks, Florian -- Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill