Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115661076
D37754.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D37754.diff
View Options
diff --git a/share/man/man7/sizeof.7 b/share/man/man7/sizeof.7
--- a/share/man/man7/sizeof.7
+++ b/share/man/man7/sizeof.7
@@ -34,35 +34,26 @@
.br
.Nm Vt expression
.Sh DESCRIPTION
-The
-.Nm
-operator yields the size of its operand.
-The
-.Nm
-operator cannot be applied to incomplete types and expressions
-with incomplete types (e.g.
-.Vt void ,
-or forward-defined
-.Vt struct foo ),
-and function types.
-.Pp
-The size of primitive (non-derived) data types in C may differ
-across hardware platforms and implementations.
-They are defined by corresponding Application Binary Interface (ABI)
-specifications, see
-.Xr arch 7
-for details about ABI used by
-.Fx .
-It may be necessary or useful for a program to be able
-to determine the storage size of a data type or object
-to account for the platform specifics.
-.Pp
The unary
.Nm
operator yields the storage size of an expression or
-data type in
-.Em char sized units
-(C language bytes).
+data type in bytes.
+.Sh DETAILS
+The size of data types in C (such as e.g., integers or
+pointers) may differ across hardware platforms and
+implementations.
+For example, systems on which integers, longs, and
+pointers are using 32 bits (e.g., i386) are referred
+to as using the "ILP32" data model, systems using
+64 bit longs and pointers (e.g., amd64 / x86_64)
+as the "LP64" data model.
+.Pp
+As it may be necessary or useful for a program to be able
+to determine the storage size of a data type or
+object,
+.Nm
+yields that size in
+.Em char sized units .
As a result,
.Ql sizeof(char)
is always guaranteed to be 1.
@@ -79,13 +70,6 @@
.In sys/param.h
header.)
.Sh EXAMPLES
-Different platforms may use different data models.
-For example, systems on which integers, longs, and
-pointers are using 32 bits (e.g., i386) are referred
-to as using the "ILP32" data model, systems using
-64 bit longs and pointers (e.g., amd64 / x86_64)
-as the "LP64" data model.
-.Pp
The following examples illustrate the possible results
of calling
.Nm
@@ -291,6 +275,11 @@
preprocessor, the
.Nm
operator cannot be used in a preprocessor expression.
+.Pp
+The
+.Nm
+operator cannot be used on a bit-field object, a
+function type, or an incomplete type.
.Sh SEE ALSO
.Xr arch 7 ,
.Xr operator 7
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 27, 5:52 PM (17 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17820413
Default Alt Text
D37754.diff (2 KB)
Attached To
Mode
D37754: Bug 268310 - update sizeof.7
Attached
Detach File
Event Timeline
Log In to Comment