From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id AEDDF385842B for ; Tue, 11 Oct 2022 14:23:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AEDDF385842B Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-3--tShuJcAMOaQwcPMPiQTrQ-1; Tue, 11 Oct 2022 10:23:43 -0400 X-MC-Unique: -tShuJcAMOaQwcPMPiQTrQ-1 Received: by mail-wm1-f71.google.com with SMTP id v23-20020a1cf717000000b003bff630f31aso3782151wmh.5 for ; Tue, 11 Oct 2022 07:23:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LiY0rpG3/N75DM/g7Q4EiuRzsg5bp5C6LXTwtRuK4Vc=; b=PDSfczXfiokZDZdBkOBtfvLFXIhQqGYwtLPzCGh+5tRbaPwKfd+phw7b2Sk9zrFexe kP2WGgk5gdKgVfDBydHm24jepmgrNsCaFAfvIugQZO/HQBE5/o2XI1AZMGCOez8EIV8H YYZfpM3LxLgeME4ek3VpweaBzQsq1Ntn1vCqLVUay0Yd+Gf+F1vzP2/xXelUlNZ4k+Yf ipLmdgCTD6rEEIXpcnGXQN3QCV+m3PTp2pVa68SJfYQv9AHscyJ4Cn7wMX/AoS2777K7 XSHiL6Cg8q1wSuPhz6rxVmfF5gN/SOk+zx91s+bpXw1tfkNYnJi+dNRAb1LspJuaJl0K Fi0Q== X-Gm-Message-State: ACrzQf0TZQt2wQ6bLWUMwnsbFq1WV2mTZCVQuTjbtAJf8NGXSZWnazeq 2Wftv3oTvRz7buO33ennOyLOxmB35DYMDvUfVhupcQ9kt01tcoLdPciQgB2PdUkq63jXxD4OrJU qjBvcMwQ5DJ+4KHkD+L5xIQ== X-Received: by 2002:a05:600c:654f:b0:3c3:b5b7:43a9 with SMTP id dn15-20020a05600c654f00b003c3b5b743a9mr14691284wmb.201.1665498222309; Tue, 11 Oct 2022 07:23:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67wj1zfEe94lIdxMgFVWZBjreGQ1mEbNq0VlSw4k0GUn1VsfEhyUvXHRekTDh2TkBtxvy6tg== X-Received: by 2002:a05:600c:654f:b0:3c3:b5b7:43a9 with SMTP id dn15-20020a05600c654f00b003c3b5b743a9mr14691267wmb.201.1665498222068; Tue, 11 Oct 2022 07:23:42 -0700 (PDT) Received: from localhost (52.72.115.87.dyn.plus.net. [87.115.72.52]) by smtp.gmail.com with ESMTPSA id r3-20020a5d4e43000000b0022a2bacabbasm11343893wrt.31.2022.10.11.07.23.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 07:23:41 -0700 (PDT) From: Andrew Burgess To: Tsukasa OI , Tsukasa OI , Mike Frysinger , Stephane Carrez , "Frank Ch . Eigler" Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF In-Reply-To: References: Date: Tue, 11 Oct 2022 15:23:41 +0100 Message-ID: <87bkqicuc2.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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: Tue, 11 Oct 2022 14:23:51 -0000 Tsukasa OI writes: > 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 MOSTLY 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 (simulator: > printf-like functions). > > - It still requires -Wno-implicit-function-declaration on the > LatticeMicro32 and M32R simulators. Except them, most of Binutils / GDB > components can be built with Clang by default with my tree. > - I noticed that the assembler is not tested enough (because just with > --enable-targets=all, it builds only host assembler). > > Full Clang 15.0.0 -Werror-free branch in development is available at: > > > Tested configuration: > - Ubuntu 22.04.1 LTS (x86_64) > - LLVM / Clang 15.0.0 (built from source) > - Configuration examples: > $srcdir/configure \ > --enable-targets=all \ > --enable-multilib --enable-ld --enable-gold --enable-nls \ > CC=clang CXX=clang++ CCLD=clang CXXLD=clang++ \ > CFLAGS=' -O2 -g -Wno-implicit-function-declaration' \ > CXXFLAGS='-O2 -g -Wno-implicit-function-declaration' > $srcdir/configure \ > --target=riscv64-unknown-linux-gnu \ > --enable-multilib --enable-ld --enable-gold --enable-nls \ > CC=clang CXX=clang++ CCLD=clang CXXLD=clang++ \ > CFLAGS='-O2 -g' CXXFLAGS='-O2 -g' > > > [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. > > > [Changes: v1 -> v2] > > - We only append ATTRIBUTE_PRINTF at function declarations, > not definitions (based on the feedback by Andrew Burgess). > - Fixed indents > - Removed ChangeLog from commit messages > (based on the feedback [to another patchset by me] by Bruno Larsen). Thanks for the updated series. I've now pushed these patches with a few minor adjustments. I'll comment on each patch where I made changes. Thanks, Andrew