__UNCONST(3) BSD 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).
BSD December 16, 2010 BSD
Check Out this Related Man Page
__UNCONST(3) BSD 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).
BSD December 16, 2010 BSD
Dear friends,
can anybody pls tell me how to pass FILE pointer in c. I am so confused .. :confused:
suppose I ve two function
1. file_open()
2. read_line()
I want to call these function from main() function and in file_open() function it will open that file and in read_line()... (5 Replies)
Hello everey one,
here i am attempting to compile a c++ project .it's throughing the following errors.
my machine details are as follows:
Linux chmclozr0119 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
errors:
=====
Generating... (0 Replies)
Hello Everyone,
I have a csv file with text qualifier as "" and data similar to below:
"1","abc","address1","US"
"2","def","address1 "characters in double-quote" address2","IND"
"3","ghi","address1","UK"
In above example, for record 2, we have an issue as in column3 contains double... (2 Replies)