Unix and Linux Discussions Tagged with compile |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
0 |
22,046 |
Shell Programming and Scripting |
|
|
|
1 |
7,642 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
4,855 |
Shell Programming and Scripting |
|
|
|
1 |
3,298 |
Programming |
|
|
|
1 |
4,926 |
UNIX for Advanced & Expert Users |
|
|
|
9 |
5,520 |
Solaris |
|
|
|
14 |
3,669 |
Programming |
|
|
|
1 |
4,345 |
UNIX for Beginners Questions & Answers |
|
|
|
11 |
3,992 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
1,094 |
Programming |
|
|
|
1 |
28,279 |
Shell Programming and Scripting |
|
|
|
0 |
5,494 |
AIX |
|
|
|
4 |
6,296 |
Slackware |
|
|
|
10 |
6,169 |
Solaris |
|
|
|
1 |
5,423 |
Red Hat |
|
|
|
1 |
4,600 |
OS X (Apple) |
|
|
|
0 |
11,600 |
Solaris |
|
|
|
17 |
28,479 |
Solaris |
|
|
|
0 |
4,469 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,580 |
Solaris |
|
|
|
1 |
4,653 |
Linux |
|
|
|
0 |
2,084 |
Ubuntu |
|
|
|
2 |
2,904 |
Programming |
|
|
|
2 |
4,376 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
4,169 |
OS X (Apple) |
|
|
|
17 |
11,216 |
Solaris |
|
|
|
5 |
48,623 |
Shell Programming and Scripting |
|
|
|
4 |
4,296 |
Programming |
|
|
|
5 |
12,721 |
Ubuntu |
|
|
|
1 |
2,839 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,568 |
Solaris |
|
|
|
1 |
5,385 |
UNIX and Linux Applications |
|
|
|
1 |
8,949 |
Shell Programming and Scripting |
|
|
|
1 |
4,870 |
Linux |
|
|
|
0 |
5,914 |
Programming |
|
|
|
0 |
3,441 |
Programming |
|
|
|
5 |
7,678 |
Programming |
|
|
|
2 |
2,959 |
Shell Programming and Scripting |
|
|
|
2 |
6,197 |
AIX |
|
|
|
0 |
799 |
Software Releases - RSS News |
__BUILTIN_CONSTANT_P(3) BSD Library Functions Manual __BUILTIN_CONSTANT_P(3)
NAME
__builtin_constant_p -- GNU extension to determine compile time constants
SYNOPSIS
int
__builtin_constant_p(value);
DESCRIPTION
The __builtin_constant_p() is a GNU extension for determining whether a value is known to be constant at compile time. The function is
closely related to the concept of ``constant folding'' used by modern optimizing compilers.
If the value is known to be a compile-time constant, a value 1 is returned. If __builtin_constant_p() returns 0, the value is not a compile-
time constant in the sense that gcc(1) was unable to determine whether the value is constant or not.
EXAMPLES
A typical example of the use of __builtin_constant_p() involves a situation where it may be desirable to fold the computation if it involves
a constant, but a function call is needed otherwise. For instance, bswap16(3) is defined in NetBSD as:
#define bswap16(x)
(__builtin_constant_p((x)) ?
__byte_swap_u16_constant(x) : __BYTE_SWAP_U16_VARIABLE(x))
SEE ALSO
gcc(1), __builtin_object_size(3), __builtin_return_address(3)
CAVEATS
This is a non-standard, compiler-specific extension.
BSD
December 19, 2010 BSD