From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 5AB97385843E for ; Sun, 25 Sep 2022 08:44:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5AB97385843E Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 9A7E5300089; Sun, 25 Sep 2022 08:44:24 +0000 (UTC) From: Tsukasa OI To: Tsukasa OI , Andrew Burgess , Mike Frysinger , Stephane Carrez , "Frank Ch . Eigler" Cc: gdb-patches@sourceware.org Subject: [PATCH 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF Date: Sun, 25 Sep 2022 08:44:10 +0000 Message-Id: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2022 08:44:27 -0000 Hello, [Background] When we build Binutils and GDB with Clang, it causes a build failure due to warnings generated by Clang and the default -Werror configuration. I finally managed to make ALL ARCHITECTURE ENABLED Binutils and GDB -Werror-free on Clang 15.0.0 (note that this does not necessarily mean warning-free) and this patchset is a part of it (the printf-like functions in the simulator). Full Clang 15.0.0 -Werror-free branch is available at: [About this Patchset] Clang generates a warning if the format string of a printf-like function is not a literal ("-Wformat-nonliteral"). On the default configuration, it causes a build failure (unless "--disable-werror" is specified). To avoid warnings on the printf-like wrapper, it requires proper __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason. This patchset adds ATTRIBUTE_PRINTF to all functions that require ATTRIBUTE_PRINTF macro. Note that most of the changes are made to architecture without any arch maintainer so I feel sorry for Andrew and Mike. Thanks, Tsukasa Tsukasa OI (7): sim: Add ATTRIBUTE_PRINTF sim/cris: Add ATTRIBUTE_PRINTF sim/erc32: Add ATTRIBUTE_PRINTF sim/m32c: Add ATTRIBUTE_PRINTF sim/m68hc11: Add ATTRIBUTE_PRINTF sim/ppc: Add ATTRIBUTE_PRINTF sim/rl78: Add ATTRIBUTE_PRINTF sim/common/sim-cpu.h | 3 ++- sim/cris/traps.c | 2 +- sim/erc32/interf.c | 2 +- sim/erc32/sis.c | 2 +- sim/m32c/trace.c | 4 ++-- sim/m68hc11/m68hc11_sim.c | 2 +- sim/m68hc11/sim-main.h | 5 +++-- sim/ppc/main.c | 2 +- sim/ppc/misc.c | 4 ++-- sim/ppc/sim_calls.c | 2 +- sim/rl78/trace.c | 4 ++-- 11 files changed, 17 insertions(+), 15 deletions(-) base-commit: 58d69206b8173b9d027a6c65f56cdaf045ae6e64 -- 2.34.1