*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> CTASSERT (9)              
Title
Content
Arch
Section
 

CTASSERT(9)

Contents


NAME    [Toc]    [Back]

     CTASSERT -- compile time assertion macro

SYNOPSIS    [Toc]    [Back]

     #include <sys/param.h>
     #include <sys/systm.h>

     CTASSERT(expression);

DESCRIPTION    [Toc]    [Back]

     The CTASSERT() macro evaluates expression at compile time and causes a
     compiler error if it is false.

     The CTASSERT() macro is useful for asserting the size or alignment of
     important data structures and variables during compilation, which would
     otherwise cause the code to fail at run time.

EXAMPLES    [Toc]    [Back]

     Assert that the size of the uuid structure is 16 bytes.

	   CTASSERT(sizeof(struct uuid) == 16);

SEE ALSO    [Toc]    [Back]

      
      
     KASSERT(9)

AUTHORS    [Toc]    [Back]

     This manual page was written by Hiten M. Pandya <[email protected]>.


FreeBSD 5.2.1			 May 15, 2003			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
lib IRIX manipulate @INC at compile time
base IRIX Establish IS-A relationship with base class at compile time
INSIST FreeBSD assertion system
INSIST_ERR FreeBSD assertion system
INVARIANT FreeBSD assertion system
INVARIANT_ERR FreeBSD assertion system
assertion_type_to_text FreeBSD assertion system
REQUIRE_ERR FreeBSD assertion system
keynote OpenBSD assertion format
set_assertion_failure_callback FreeBSD assertion system
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service