From nobody Sun Mar 10 13:55:41 2024 X-Original-To: bugs@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 4Tt1dV0DFDz5Cv4F for ; Sun, 10 Mar 2024 13:55:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tt1dT6CDKz4pWv for ; Sun, 10 Mar 2024 13:55:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710078941; a=rsa-sha256; cv=none; b=wBaO4oebePETjCc9HeNaXaZ/FbUNtfiTrr1upZ4U3q+eowLicaC7G7Hhx9CIiZOCbIOaQU ytQtfejd3JscMs2GB8fcHc88obJvvYWmsgVxzeBGyjlNC+cEkqd0tU7Ra1b1SZBl6NMFqU jdhYBDuBKv5atARnIxFxSfQeA452mJeq+YI+ZiXqyjhtH+M/d0CwaAbzCJiGtRTyO5jBO8 jQLNxnyTz2lQU+Ik0o4zdOlHm3DqtYwn8v3DwnasKbK4sAzstSfsvw/++IFZ39wUNjsXQz PZmBOPOlZMKVIBtDH91BOsneJYccFudAlXQOExGDtve86L3z3Zb2xV6NEWqR3A== 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=1710078941; 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; bh=p7TcI+QW3yH+NeZlcoP2zEV56GjhQ7lp9IPUyLHnxnQ=; b=xjq9x7K5BEwfn4kqujS3TTgdmSP1SrYWLSix938ltPUaodeZk+TsKC1NuQtvf2mWInT/Sl gvcWdD4gdyyCO2k9lg+GsIHln9pBi46oLgS66Nwyb7B9+7pUzeisW9XsyrwmZZIuK8Pc5s Th8kdRr0KaKk9VTs7hyT69SYcI+UhUU6eWHSpIFT3LU5To1MzJ5nH/7xSRK7/DMWP/V+Sv EvTv2NhHjR2EhTROM027OkETM38UnntPrJtYFkOsjlOKlpa9LzwOrJcVugm86hWUM/obVt G7N8T7PtvYQmC4TJEL70sFTovOcjEGHcczw4Q58qjVTB3B7u0nO2k87e4kF/BQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tt1dT5hVNzpZH for ; Sun, 10 Mar 2024 13:55:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 42ADtfXE031753 for ; Sun, 10 Mar 2024 13:55:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 42ADtfgp031749 for bugs@FreeBSD.org; Sun, 10 Mar 2024 13:55:41 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 277612] libc printf not compatible with glibc with negative nan Date: Sun, 10 Mar 2024 13:55:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: pjfloyd@wanadoo.fr X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277612 Bug ID: 277612 Summary: libc printf not compatible with glibc with negative nan Product: Base System Version: 14.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: pjfloyd@wanadoo.fr I think that it would be better for compatibility for printf of negative na= ns to include the minus sign. The C standard does say A double argument representing an infinity is converted in one of the styles [-]inf or [-]infinity =E2=80=94 which style is implementation-defined. A double argum= ent representing a NaN is converted in one of the styles [-]nan or [-]nan(n-char-sequence) =E2= =80=94 which style and=20 the meaning of any n-char-sequence, is implementation-defined. The F conver= sion specifier produces INF, INFINITY, or NAN instead of inf, infinity, or nan, respectively.337) >From what I see the cod that controls this is =E2=94=82 > 785 if (expt =3D=3D INT_MAX) { /* = inf or nan */ =E2=94=82 786 if (*cp =3D=3D 'N') { =E2=94=82 787 cp =3D (ch >=3D= 'a') ? "nan" : "NAN"; =E2=94=82 788 sign =3D '\0'; in vfprintf.c --=20 You are receiving this mail because: You are the assignee for the bug.=