Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2024 08:43:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 277234] About the definition of FILE in the freebsd-src/include/stdio.h
Message-ID:  <bug-277234-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277234-227>