Unix and Linux Discussions Tagged with compile |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
0 |
24,644 |
Shell Programming and Scripting |
|
|
|
1 |
8,988 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
5,816 |
Shell Programming and Scripting |
|
|
|
1 |
4,201 |
Programming |
|
|
|
1 |
8,528 |
UNIX for Advanced & Expert Users |
|
|
|
9 |
9,816 |
Solaris |
|
|
|
14 |
4,511 |
Programming |
|
|
|
1 |
5,281 |
UNIX for Beginners Questions & Answers |
|
|
|
11 |
5,214 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
1,342 |
Programming |
|
|
|
1 |
33,320 |
Shell Programming and Scripting |
|
|
|
0 |
6,446 |
AIX |
|
|
|
4 |
7,048 |
Slackware |
|
|
|
10 |
6,676 |
Solaris |
|
|
|
1 |
6,184 |
Red Hat |
|
|
|
1 |
4,929 |
OS X (Apple) |
|
|
|
0 |
11,986 |
Solaris |
|
|
|
17 |
29,704 |
Solaris |
|
|
|
0 |
4,876 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,819 |
Solaris |
|
|
|
1 |
4,958 |
Linux |
|
|
|
0 |
2,205 |
Ubuntu |
|
|
|
2 |
3,100 |
Programming |
|
|
|
2 |
4,538 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
4,444 |
OS X (Apple) |
|
|
|
17 |
12,310 |
Solaris |
|
|
|
5 |
49,298 |
Shell Programming and Scripting |
|
|
|
4 |
4,674 |
Programming |
|
|
|
5 |
13,124 |
Ubuntu |
|
|
|
1 |
2,977 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,745 |
Solaris |
|
|
|
1 |
5,541 |
UNIX and Linux Applications |
|
|
|
1 |
9,216 |
Shell Programming and Scripting |
|
|
|
1 |
5,115 |
Linux |
|
|
|
0 |
6,216 |
Programming |
|
|
|
0 |
3,633 |
Programming |
|
|
|
5 |
7,943 |
Programming |
|
|
|
2 |
4,324 |
Shell Programming and Scripting |
|
|
|
2 |
6,711 |
AIX |
|
|
|
0 |
883 |
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