From nobody Wed Jul 10 18:19:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WK5j73w4Nz5QvcC; Wed, 10 Jul 2024 18:19:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WK5j73Ntrz4v1h; Wed, 10 Jul 2024 18:19:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720635547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6LMnNtaiU5Exj/q/9u3iPQjsNWIAbP6Rp7dbE/fciOs=; b=W9z++MNv7Q4Uo0Q+2s38VRdod2ij/b+TLUiPZEZj33HXoXONFcVd4jam0V4YGmmEQ5cN8L A6FQ2yW4OahvVOd+nWfxT4wqXbq1hl9APRtHICXSvMxO4ZASzMi0BP5RUU0c/ZZcbg+Fec xNbA1FWFFWV0vENsP3D9ffX1NeAmwEB3QzoO1ohJovMftk+8PlUF3iGZei83qm6fhzw9hK tdSiC/3JBGTpugJKjP3G6030L4yKyD6v2a5wtc/QUnPikbG9ClE2uyYdGJ6q6ZucPws12E gHJw1Wtn+JXGivsH5jvhInWt7Ma623x6zhTf8ZQFMHvvVexTVaQ6SYMREpsXvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720635547; a=rsa-sha256; cv=none; b=e85lZGhDWslLbrkqHFK2rk3Y3t9q/9xVkbZgSu7j2/Qjvi2CKISwBi5RlLEPHpIxN+G1OO CZcqkyfCjxjnV6qUG0WtsIOCA6uoBtS3ZPm7H9zvbzGzTPBUU76MKWZMZQVwIfKDK3fshb N5Ytn4XrLDEX5Ca/Vgl/Vd5/balE+pW/3Mr8ps8bzHUYBevhB58UmlXJxQgx8wKqkDjfxP i0QozDDfkaTzWsTyMS5ESD1mD0fLgaAT2Rp8oSWqyj9CtutWq94raYdBeL073e1Y2IF3xM WHsxRk7wRNmflSv6smC0yUnRhSUD1I4G74Ji/ShMHEyF5hBskUQWmfwqzyNLiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720635547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6LMnNtaiU5Exj/q/9u3iPQjsNWIAbP6Rp7dbE/fciOs=; b=A/8OkByuT5TZIWgTUVXBJeo9Px/1DdVhS4bZW0l1YdWjAV38nQuaF8aGGPLzgj31CJy0Yv P6tJWOzTih8XmrjT2xHb8XZm3scUWbMze9fmGdCVJocD445RXKUu4Ql73C9gn8HeSz5i1D X3QJllqMVx0LaqCfZHcecktSJWPsqzHQG37f+jq6XO4sXXWWQY3/VMHXVkUSmEDw5Hcyo7 P1wKu2fVJNkKtvtRtALpOlLaiRPzUE9Iy8Pm8KhHjBTU6OGhbPCyUU1Ek0PUrnZF2XwS0Q g5O3Q57u0wb0Is5o7J0IcBszi7YLzqKOM9QPdSTvBfArlat5mhHbLg08M9hhHQ== Received: from [IPV6:2601:5c0:4200:b830:a52b:58f5:f939:83f7] (unknown [IPv6:2601:5c0:4200:b830:a52b:58f5:f939:83f7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WK5j71T93zfYn; Wed, 10 Jul 2024 18:19:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Wed, 10 Jul 2024 14:19:06 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 6677621bad00 - main - cdefs.h: Fallback to printf0 for __printf0like Content-Language: en-US From: John Baldwin To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202407061944.466JiiQ3026410@gitrepo.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/6/24 17:56, John Baldwin wrote: > On 7/6/24 15:44, Warner Losh wrote: >> The branch main has been updated by imp: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=6677621bad00191dfec1b0a20ae1618b92745d9b >> >> commit 6677621bad00191dfec1b0a20ae1618b92745d9b >> Author: Warner Losh >> AuthorDate: 2024-07-06 19:42:37 +0000 >> Commit: Warner Losh >> CommitDate: 2024-07-06 19:45:03 +0000 >> >> cdefs.h: Fallback to printf0 for __printf0like >> >> For some reason, my tests were fine with this like it was, but CI for >> gcc12 and gcc13 is complaining. Revert to the old form until that can be >> worked out why the mismatch. >> >> Fixes: 0b82dac337e7 >> Sponsored by: Netflix >> --- >> sys/sys/cdefs.h | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h >> index 6b861b1903f6..a56839d57c7a 100644 >> --- a/sys/sys/cdefs.h >> +++ b/sys/sys/cdefs.h >> @@ -356,9 +356,12 @@ >> * Clang has always had printf and printf0 as aliases. gcc 11.0 now follows >> * clang. So now this is an alias for __printflike, or nothing. In the future >> * _Nullable or _Nonnull will replace this. >> + * XXX Except that doesn't work, so for now revert to printf0 for clang and >> + * the FreeBSD gcc until I can work this out. >> */ >> -#if defined(__clang__) || __GNUC_PREREQ__(11, 0) >> -#define __printf0like(fmtarg, firstvararg) __printflike(fmtarg, firstvararg) >> +#if defined(__clang__) || (defined(__GNUC__) && defined (__FreeBSD_cc_version)) >> +#define __printf0like(fmtarg, firstvararg) \ >> + __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) >> #else >> #define __printf0like(fmtarg, firstvararg) >> #endif > > It's because my patch for devel/freebsd-gcc{12,13} is kind of wrong. I had a mismerge > when updating the printf0 patch from gcc9 to gcc12 that ended up re-adding the > warn on NULL. I need to update the ports to remove that part of the patch. I will > probably leave printf0 working for now in the ports just as an alias for regular > printf to give us some transition time. FYI, I have merged this fix to the ports, but not sure how we want to manage doing the patch to cdefs.h. I kind of think we should apply the change to cdefs.h in main in another week or so. I'm less certain of what to do for stable branches. -- John Baldwin