__BUILTIN_OBJECT_SIZE(3) BSD Library Functions Manual __BUILTIN_OBJECT_SIZE(3)NAME
__builtin_object_size -- return the size of the given object
SYNOPSIS
size_t
__builtin_object_size(void *ptr, int type);
DESCRIPTION
The __builtin_object_size() function is a gcc(1) built-in function that returns the size of the ptr object if known at compile time and the
object does not have any side effects.
RETURN VALUES
If the size of the object is not known or it has side effects the __builtin_object_size() function returns:
(size_t)-1 for type 0 and 1.
(size_t)0 for type 2 and 3.
If the size of the object is known, then the __builtin_object_size() function returns the maximum size of all the objects that the compiler
knows that they can be pointed to by ptr when type & 2 == 0, and the minimum size when type & 2 != 0.
SEE ALSO gcc(1), __builtin_return_address(3), attribute(3), ssp(3)HISTORY
The __builtin_object_size() appeared in GCC 4.1.
CAVEATS
This is a non-standard, compiler-specific extension.
BSD December 19, 2010 BSD
Check Out this Related Man Page
__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
FYI, the GCC compiler is available for OS X. This means you can easily compile all the super GCC opensource. You can see the GCC and other
projects <A HREF=http://www.opensource.apple.com//projects/darwin/1.2/projects.html>HERE</A>.<P>
Also, I looked into how OS X handles OS 9 applications. ... (12 Replies)
I just want to know Three questions:
1.what is the name of c++ compiler used in Linux/Unix (like gcc compiler used for c ).And please tell me how can i compile the program of c++.
2. I have Devloped a program of Database in C Under Linux/Unix Enviornment and now i want to add some graphics... (4 Replies)
I need to know how to make a binary with gcc. I know how to create an obj file, but I'm not quite sure what to do about the linking part. I've gotten this far "gcc -c somefile.c somefile.o" then I'm left with an object file, but I don't see any linking command line options. Does anyone know how... (4 Replies)
where to download gcc compiler for ubuntu?
how to install?
how to build and run "c programs"?
screen shots if possible.....:b::D
tutorials too:cool: (5 Replies)
hey, I believe I once saw a post in this forum, about enable an GCC option to enable long types. I simply cannot find it any more. Can anybody give me a hint? I am on 32bit Ubuntu, and I would like my int be really long. Also I need malloc() take long int argument too.
I found it is necessary to... (6 Replies)
We have recently downloaded, installed and compiled gcc-3.0.4 code. gcc compiler has built successfully and we where able to compile some same test cpp file. I would like to know how we can modify gcc source code so that we add additional run time debugging statements like the binary in execution... (4 Replies)
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)
Gurus,
This might be a piece of cake for you guys! But I have been ransacking the web (and my brain - no hardwork there!) to see if I could get my hands around a relocateable version of GCC - why so??
from compile problems I am facing, it is evident my current gcc version is clearly not... (15 Replies)
Hi all,
I would like to compile a program and get current errors and warnings report to me as « gcc -Wall ».
Does someone can give me these options to get an equivalent ?
Or the ommon option used to put them in a CFLAGS in a Makefile.
Something like :
xlc -O2 -Wall my_prog.c -o... (5 Replies)
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)
Hi,
i want to do some manipulation of gcc outputs,
and have some questions:
1. i am trying to check what kind of outputs i can get after running gcc on a *.c file, but except for errors or warnings i don't see anything.
so, what outputs can i get from gcc?
2. does all error and warnings... (5 Replies)
First of all -- thanks for being patient with me. I hope I'm submitting this correctly. Also I haven't done UNIX Admin since the early 1990's. I'm actually a DBA. But, since I'm the one in the office with the UNIX experience, I'm the SA.
I haven't been able to compile GCC 6.3.0 which I need... (9 Replies)
What exactly is the -Warray-bounds option to the GCC compiler supposed to warn about?
the man page states:
~ g++ --version
g++ (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
Copyright (C) 2017 Free Software Foundation, Inc.Thank you. (14 Replies)