Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

__builtin_constant_p(3) [netbsd man page]

__BUILTIN_CONSTANT_P(3) 				   BSD Library Functions Manual 				   __BUILTIN_CONSTANT_P(3)

__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

Check Out this Related Man Page

__BUILTIN_RETURN_ADDRESS(3)				   BSD Library Functions Manual 			       __BUILTIN_RETURN_ADDRESS(3)

__builtin_return_address -- the return address of a function SYNOPSIS
void * __builtin_return_address(unsigned int level); void * __builtin_frame_address(unsigned int level); DESCRIPTION
The __builtin_return_address() is a GNU extension for obtaining the return address of the current function or one of the callers of the cur- rent function. The parameter level specifies the number of frames that should be scanned up in the call stack. A value 0 returns the address of the current function, a value 1 requests the address of the caller of the current function, a value 2 asks for the address of the caller's caller, and so forth. If the top of the call stack has been reached, the function will return 0. Note also that on some architectures it is only possible to determine the address of the current function. In such cases a value 0 is returned. Thus, it is usually safe to only use the value 0 for level. The __builtin_frame_address() behaves similarly, but returns the address of the function frame rather than the return address of the func- tion. SEE ALSO
gcc(1), __builtin_object_size(3) CAVEATS
These are non-standard, compiler-specific extensions. BSD
December 19, 2010 BSD
Man Page

15 More Discussions You Might Find Interesting

1. Solaris

gcc problems

I downloaded and installed the gcc binaries recently. I am now trying to compile openssh, but I get bad compiler issues when I try this. in the openssh directory, I run: ./configure (mind you, I have usr/local/bin/gcc in my PATH) but the output says checking for gcc... no Why... (7 Replies)
Discussion started by: AJA
7 Replies

2. Programming

Porting From Linux To Hpux

Gents, i'm a senior applications developer and need to port a Linux server application ( no additional / special libraries or unique header files ) to a HPUX enviroment. Any chance to compile it on the Linux using flags to create an HPUX binary with gcc? (8 Replies)
Discussion started by: anak0nda
8 Replies

3. Programming

GNU GDB compile problem

I have to compile gnu-gdb 6.7 on HP-UX 11.11 with /usr/local/pa64/bin/gcc 64-bit compiler, but I'm having some problems during "make": ser-tcp.c: In function `net_open': ser-tcp.c:207: warning: passing arg 5 of `getsockopt' from incompatible pointer type make: *** Error 1 make: Leaving... (8 Replies)
Discussion started by: untamed
8 Replies

4. Programming

New to C/gcc compiler - compile error.

I am new to comiling c/c++ programs with gcc compilier unix - AIX version 5.3 gcc compiler version - 4.0.0 My makefile. # makefile 1.0 08/20/98 #CC = cc CC = gcc ESQL = esql CFLAGS = -Wall DBSLIB= DBSLIB=-L${INFORMIXDIR}/lib/esql -L${INFORMIXDIR}/lib `esql -libs` ALL = hds_near... (9 Replies)
Discussion started by: anish
9 Replies

5. AIX

Compile gcc on AIX 5.2

I'm trying to compile gcc 3.4.6 on AIX 5.2 but I get this error: bison -t --name-prefix=java_ -o java/parse.c java/parse.y M4sugar requires GNU M4. Install it before installing M4sugar or set the M4 environment variable to its path name.make: *** Broken pipe gcc -c -g -O2 -DIN_GCC -W... (7 Replies)
Discussion started by: untamed
7 Replies

6. Linux

c++ compilation error

Hello every one, here i am attempting to compile a c++ module using is throwing a error . error: ==== > make -S dummyCHARGP /usr/local/bin/gcc -g -DDEBUG -DMAT -I. -I/swtemp/usbs/cc/unix-ce/root/subsys/lib/Linux/ -I/opt/dce/include -I/opt/dce/include/dce ... (12 Replies)
Discussion started by: mannam srinivas
12 Replies

7. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

8. BSD

Anyone using GNU BSD?

Is anyone using or planning to use GNU BSD in production yet? I'd like to hear experiences. (Debian GNU/NetBSD) (8 Replies)
Discussion started by: vpsville
8 Replies

9. Programming

Is gcc compliant with the C++ standards

Hello Friends, I am a newbie and have started using different compilers and tools to make myself familiar with their workings. I wanted to know that how compliant is gcc with the C++ standards. It is pretty obvious that no compiler is close to being completely compliant, but if there are some... (7 Replies)
Discussion started by: hthapar
7 Replies

10. UNIX for Dummies Questions & Answers

How to get a compiler gcc, cc, cl.exe...? (literally 1st time unix user)

Hi all, I've done hours of reading on google and can't find an answer... I'm trying to compile/install the Apache web server on a Unix vm. When i try ./compile (the file's been unzipped already), I get this error: $ ./configure checking for chosen layout... Apache checking for working mkdir... (8 Replies)
Discussion started by: eddlo
8 Replies

11. Programming

Gcc with pipe

I want to compile all files in my directory i wrote find *.c | gcc -o * *.c but it dosent work :( Help pliz (12 Replies)
Discussion started by: rzili
12 Replies

12. Solaris

There is gcc but doesn't work !!

gcc packages are installed as is seen. # pkginfo | grep -i gcc system SUNWgcc gcc - The GNU C compiler system SUNWgccruntime GCC Runtime libraries # There is gcc in /usr/sfw/bin but It doesn't work. # gcc bash: gcc: command not found... (7 Replies)
Discussion started by: getrue
7 Replies

13. Solaris

Need gcc binary for a SPARC machine

The machine I am trying to compile on does have /usr/sfw/bin and all the files in it, EXCEPT gcc !! This is a SUN Sparc-1 machine, so the binary does matter to match this. Can someone send me a gcc so I can put it locally for compilation purposes? Or point me a a site that has a compiled-ready... (17 Replies)
Discussion started by: steve701
17 Replies

14. UNIX for Advanced & Expert Users

AIX 7.1 gcc 4.8.5 issue

hey guys , after migrate our AIX server from 6.1 to 7.1 , we insalled c compilator with rpm files Server:root:/ > rpm -qa | grep gcc libgcc-4.8.5-1 gcc-cpp-4.8.5-1 gcc-4.8.5-1 gcc-c++-4.8.5-1 but whene we proceed to compile a c programm we have this error exec(): 0509-036... (17 Replies)
Discussion started by: yahia
17 Replies

15. UNIX for Advanced & Expert Users

Gcc g++ on cygwin - configure: error: *** A compiler with support for C++11 language features is req

Hi, Apologies if I posted it in a wrong section as it is related to gcc on cygwin. Please move it to appropriate section. I'm trying to compile and build libsigc++-2.10.2 on cygwin with gcc 8.3.0. when I run ./configure, I get this: I couldn't fully understand what does... (13 Replies)
Discussion started by: prvnrk
13 Replies