__builtin_types_compatible_p man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

__BUILTIN_TYPES_COMPA... BSD Library Functions Manual __BUILTIN_TYPES_COMPA...

NAME
     __builtin_types_compatible_p — GNU extension to check equivalent types

SYNOPSIS
     int
     __builtin_types_compatible_p(type_a, type_b);

DESCRIPTION
     The __builtin_types_compatible_p() is a GNU extension for determining
     whether two types are equivalent.	If type_a is equivalent to type_b, a
     value 1 is returned.  Otherwise __builtin_types_compatible_p() returns 0.

     The following remarks should be taken into account.

	   1.	The architecture-specific size of the two types does not have
		an impact on the result.  For example, sizeof(char *) and
		sizeof(int) result the same value on i386, but the types natu‐
		rally are not equivalent.

	   2.	Type qualifiers are ignored.  The function returns the same
		value for long and const long.

	   3.	The amount of pointer indirection affects the result.  For
		example, double * is not equivalent to double **.

	   4.	Two types defined with typedef are equivalent if and only if
		their underlying types are equivalent.

	   5.	The enum type is a special case in that two enum types are not
		considered equivalent.

EXAMPLES
     The following example combines __builtin_types_compatible_p() and the
     typeof(3) construct:

	   #define __COMPARE_TYPES(v, t)      \
		    __builtin_types_compatible_p(__typeof__(v), t)

	   ...

	   if (__COMPARE_TYPES(p, double) != 0)
		   err(EX_DATAERR, "invalid type");

SEE ALSO
     gcc(1), __builtin_constant_p(3), typeof(3)

CAVEATS
     This is a non-standard, compiler-specific extension.

BSD			       December 21, 2010			   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net