From nobody Fri Feb 23 08:43:16 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 4Th3SN3wZtz5C3Hp for ; Fri, 23 Feb 2024 08:43:16 +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 4Th3SN263fz4Fds for ; Fri, 23 Feb 2024 08:43:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708677796; 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=oNn3q2nLYMZGrZ7c2oY0rPJBKQYHvqVHg1sJMKdkkPw=; b=a3SbAb4ef6QuTJ1NsuKhR/U789YnSwYGhWD8C1FOfbc+v0ezfKL5JUbR3WDawCshsvbXdT lRb447QoHEFOha77XD2XyOX/7S7NhGQolFhwXtnRHdqV6+9YO9tgk04nXMs6b1FoCna0l+ ttWfKNG7sPnBRqCtyohDgHCGOorlapoO3ULE33qj5LpSRrDIddmPzPGYrbDXjylPnDPGsw K/wzmuTAm/KnPfNmfTck2/VZWjZ4g7wDKEYN2MhVPN/n71hgIl/TEsrxakjvS1PwgCtCon EeY98G1hR1kFP+Xgf3evs63MwydDMFiSFZmRQL6y4AC1B/jhWBoUGiE5bKeZZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708677796; a=rsa-sha256; cv=none; b=O9/BPH5lT2xDewes6v96jvX8VYZn4ll+FB1Ujty8nE6FNinG6x/v/gEwCDZsCh0Sylc9IE nQWwhJRDzIbK0eaa9mwTSBWW6YMQMDel6fpsDUVglsmDgO9NFbOqabYn/v4u3cjSmg41UB i0B4l2A8EARxUqH8J9ywMOtp66FRMl8MVP9YlMLdOYmN1xPkyIYqwEy/JGH2/kArSWUq+K UK5hDMNX79KD1Gzn/qAEonCp+V+T6G9BK1SL7ULLHarubeSbeN7axpVJkL65LKamF7G94b Z2A7a8cH68fzWYwwtu/EL6uxVW/r1wzUj3SsVO3mwFvSurpF2uAt1p4QtdHcfw== 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 4Th3SN17Ymz183M for ; Fri, 23 Feb 2024 08:43:16 +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 41N8hGBB047403 for ; Fri, 23 Feb 2024 08:43:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 41N8hG2P047401 for bugs@FreeBSD.org; Fri, 23 Feb 2024 08:43:16 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 277234] About the definition of FILE in the freebsd-src/include/stdio.h Date: Fri, 23 Feb 2024 08:43:16 +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: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: qianxliu@cisco.com 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 attachments.created 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=3D277234 Bug ID: 277234 Summary: About the definition of FILE in the freebsd-src/include/stdio.h Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: qianxliu@cisco.com Created attachment 248688 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D248688&action= =3Dedit The definition of FILE on the Ubuntu(Linux kernel, GNU) https://github.com/freebsd/freebsd-src/blob/09cb8031b43c8e98abb5ff9b43ff649= 031d1e808/include/stdio.h#L121 Which is similar to the Mac System. I found that Ubuntu(Linux kernel, GNU) used a different definition of FILE. I don't know what's better, but I thought Linux seemed more robust(See the png). https://github.com/freebsd/freebsd-src/blob/09cb8031b43c8e98abb5ff9b43ff649= 031d1e808/include/stdio.h#L132 which means we possibly need to force-cast the void pointers of the function parameters, and this standard seemed to be identified as a bug in the strict standard. Because the C compiler is born with the type system and void is a= lso a type. This practice may violate the principle of type inheritance. Anyway, it's the key part so I just propose my view to spark the discussion= s. --=20 You are receiving this mail because: You are the assignee for the bug.=