From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1252B3858401; Tue, 18 Oct 2022 14:29:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1252B3858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666103373; bh=u6rZ3CPTXiYRb7R2VmLntE3xMTNM615IfnZaXhd9Fa0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TDaOTynR0WLKQSBX2PGhype29f+HhZFh3SLg18KW3RGHeRLnfnAvKEnI+s1xwugdX DVJ8HmhwuNGi+Bg4NyWxvnPWe0S2iio62oDsAsRPXzdKcJV4n7XuG4MDr8+YHfgT+h ZeSXIaFbSeIVflNky6dZ16g+AR7OS6Gb6tWY6kFY= From: "dcrocker at eschertech dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/48379] -Wdouble-promotion warns for promotion by varargs Date: Tue, 18 Oct 2022 14:29:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: dcrocker at eschertech dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D48379 David Crocker changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcrocker at eschertech dot= com --- Comment #4 from David Crocker --- I too am getting fed up with having to add an explicit cast to double to suppress the warning whenever I pass a float to a varargs function. I have probably spent a few hours this year adding these casts. As has already been said, nothing can he done about the promotion in this context, so it's not worth warning about. Whereas in other situations, the warning is very usefu= l to me because I work with embedded processors that have single-precision but n= ot double-precision floating point hardware, so I want to avoid double precisi= on maths as far as possible.=