*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: __UNCONST | Section: 3 | Source: NetBSD | File: __UNCONST.3
__UNCONST(3) FreeBSD Library Functions Manual __UNCONST(3) NAME __UNCONST - compile time cast-away macro SYNOPSIS #include <sys/cdefs.h> void __UNCONST(x); void __UNVOLATILE(x); DESCRIPTION The __UNCONST() macro can be used to omit warnings produced by certain compilers when operating with pointers declared with the const type qualifier in a context without such qualifier. Examples include passing a pointer declared with the const qualifier to a function without such qualifier, and variable assignment from a const pointer to a non-const pointer. In the same vein, the __UNVOLATILE() macro can be used to exclude warnings related to the volatile type qualifier. IMPLEMENTATION NOTES These macros are implemented by explicitly using unsigned long instead of intptr_t, a signed type guaranteed to hold a pointer. SEE ALSO cc(1), cdefs(3) CAVEATS As both macros may hide valid errors, their usage is not recommended unless there is a well-thought reason for a cast. A typical use case for __UNCONST() involve an API that does not follow the so-called ``const correctness'' even if it would be appropriate. Valid use cases of __UNVOLATILE() include passing a volatile pointer to memset(3). Use of this macro is non-portable; this is part of the implementation namespace and should only be used in NetBSD code. FreeBSD 14.1-RELEASE-p8 October 17, 2013 FreeBSD 14.1-RELEASE-p8

Navigation Options