mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
Add a note that CTASSERT() should not be used in header files.
This commit is contained in:
parent
ab5ed97ed0
commit
7c77eeb816
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182791
@ -26,7 +26,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd May 15, 2003
|
.Dd September 5, 2008
|
||||||
.Os
|
.Os
|
||||||
.Dt CTASSERT 9
|
.Dt CTASSERT 9
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -48,6 +48,14 @@ The
|
|||||||
macro is useful for asserting the size or alignment of important
|
macro is useful for asserting the size or alignment of important
|
||||||
data structures and variables during compilation, which would
|
data structures and variables during compilation, which would
|
||||||
otherwise cause the code to fail at run time.
|
otherwise cause the code to fail at run time.
|
||||||
|
.Sh IMPLEMENTATION NOTES
|
||||||
|
The
|
||||||
|
.Fn CTASSERT
|
||||||
|
macro should not be used in a header file.
|
||||||
|
It is implemented using a dummy typedef, with a name (based on line number)
|
||||||
|
that may conflict with a
|
||||||
|
.Fn CTASSERT
|
||||||
|
in a source file including that header.
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
Assert that the size of the
|
Assert that the size of the
|
||||||
.Vt uuid
|
.Vt uuid
|
||||||
|
Loading…
Reference in New Issue
Block a user