From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 6F7B93896C30 for ; Mon, 9 Nov 2020 17:21:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6F7B93896C30 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id A6C2F30291AB; Mon, 9 Nov 2020 18:21:12 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 81BBE413C07B; Mon, 9 Nov 2020 18:21:12 +0100 (CET) Message-ID: <7f28f67458fd28068914bb9cc18bae1cb34ab8a7.camel@klomp.org> Subject: Re: Indent and formatting of elfutils From: Mark Wielaard To: Navin P , elfutils-devel@sourceware.org Date: Mon, 09 Nov 2020 18:21:12 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2020 17:21:15 -0000 Hi Navin, On Mon, 2020-11-09 at 22:03 +0530, Navin P via Elfutils-devel wrote: > I'm trying to compile elfutils with clang. > I haven't written new code but moved code around. In this process sour= ce > code formatting is lost when I moved couple of functions. >=20 > Do you have any indent settings or clang-format or any auto settings ? Unfortunately (last time we checked) clang didn't support enough of the gnu99 standard to build elfutils. See the following comment for our configure check: # We use -std=3Dgnu99 but have explicit checks for some language constructs # and GNU extensions since some compilers claim GNU99 support, but don't # really support all language extensions. In particular we need # Mixed Declarations and Code # https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html # Nested Functions # https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html # Arrays of Variable Length # https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html You might want to poke the clang developers to make sure they support those extended GNU C language features. As soon as they do, the configure check should succeed and you should be able to use the clang tools to build stuff. Cheers, Mark