👤
Home Man
Search
Today's Posts
Register

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:
Select Section of Man Page:
Select Man Page Repository:

NetBSD 6.1.5 - man page for typeof (netbsd section 3)

TYPEOF(3)			   BSD Library Functions Manual 			TYPEOF(3)

NAME
     typeof -- GNU extension for type of an expression

SYNOPSIS
     type
     typeof(expression);

DESCRIPTION
     The typeof() construct can be used to obtain the type of an expression.  The syntax is com-
     parable to that of sizeof(), but semantically typeof() operates like a type name defined
     with typedef.

EXAMPLES
     The following is a typical example of a type-generic macro:

	   #define MAX(a, b) ({ 	   \
		   typeof(a) _a = (a);	   \
		   typeof(b) _b = (b);	   \
		   _a > _b ? _a : _b;	   \
	   })

SEE ALSO
     gcc(1), __alignof__(3), attribute(3), offsetof(3)

CAVEATS
     The typeof() construct is a non-standard, compiler-specific extension.

BSD					December 19, 2010				      BSD


All times are GMT -4. The time now is 10:05 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password