Unix and Linux Discussions Tagged with compile |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
0 |
25,299 |
Shell Programming and Scripting |
|
|
|
1 |
9,709 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
6,102 |
Shell Programming and Scripting |
|
|
|
1 |
4,526 |
Programming |
|
|
|
1 |
8,934 |
UNIX for Advanced & Expert Users |
|
|
|
9 |
10,314 |
Solaris |
|
|
|
14 |
4,783 |
Programming |
|
|
|
1 |
5,389 |
UNIX for Beginners Questions & Answers |
|
|
|
11 |
5,447 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
1,434 |
Programming |
|
|
|
1 |
33,623 |
Shell Programming and Scripting |
|
|
|
0 |
6,597 |
AIX |
|
|
|
4 |
7,394 |
Slackware |
|
|
|
10 |
6,848 |
Solaris |
|
|
|
1 |
6,278 |
Red Hat |
|
|
|
1 |
5,066 |
OS X (Apple) |
|
|
|
0 |
12,068 |
Solaris |
|
|
|
17 |
29,912 |
Solaris |
|
|
|
0 |
5,082 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,883 |
Solaris |
|
|
|
1 |
5,035 |
Linux |
|
|
|
0 |
2,241 |
Ubuntu |
|
|
|
2 |
3,144 |
Programming |
|
|
|
2 |
4,609 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
4,496 |
OS X (Apple) |
|
|
|
17 |
12,475 |
Solaris |
|
|
|
5 |
49,392 |
Shell Programming and Scripting |
|
|
|
4 |
4,903 |
Programming |
|
|
|
5 |
13,278 |
Ubuntu |
|
|
|
1 |
3,024 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,790 |
Solaris |
|
|
|
1 |
5,597 |
UNIX and Linux Applications |
|
|
|
1 |
9,287 |
Shell Programming and Scripting |
|
|
|
1 |
5,192 |
Linux |
|
|
|
0 |
6,305 |
Programming |
|
|
|
0 |
3,690 |
Programming |
|
|
|
5 |
8,000 |
Programming |
|
|
|
2 |
4,746 |
Shell Programming and Scripting |
|
|
|
2 |
6,813 |
AIX |
|
|
|
0 |
918 |
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