suggestion for GCC (1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From our previous discussion I only became confused and suspicious
about my previous knowledge i collected from my emails to the mailing
list and raised new questions:

1) What is a built-in function in gcc (and in the manual of gcc)?
Is it a function which its C/Assembly code is inside the code of the
compiler? or Its code is some where on hard disk and inside a library
function? or the code of the built in function is on hard disk but
when we build a program we do not need to link the library of that
function and the compiler automatically finds the code of that
function from a library function on hard disk and adds it to our
program automatically?
I raised different scenarios about what a built in is, unfortunately
the manual of gcc does not explain these facts at all, leaves the
reader completely confused.

2) Ian said in one message that some supporting routine is necessary
for nested functions. What does a nested function mean? It means we
have a C function and then it calls another function inside by its
name?

3) Ian told that the functions like memcpy should be optimized and
they are target dependent and we do not make them as built in. It is
unacceptable in my opinion.
We are talking about a great new feature for gcc, embedded programming
and writing firmwares, not optimization, which gives gcc a great power
and it is a new branch of programming. The fact that the code may be
slower or it takes more memory is a secondary trivial problem in this
case to me.
Besides compiler must be able to translate a code for a specific CPU,
why gcc is dependent to some thing except CPU?!!! Dependent to what?
(To me gcc has a bug which is dependent to some definitions outside
its code, It is a software issue which can be corrected)

4) does gcc have any extension to produce stand alone code in open
source space you may aware of( for a free standing environment without
libraries).

5) Ian said:
"The compiler does by default treat functions like memcpy as builtins,
and ..."
If memcpy is built in why gcc still generates some calls to memcpy
and memcpy should be provided some how as the manual of gcc says?

6) Where is memcpy at last? is it in libgcc, libc or it is built in?

7) Can i link only libgcc with my code in case of -nostdlib? and every
thing is OK? I write libgcc.a on my command line and every thing is
OK?

8) When exactly compiler generates call to mem functions like memcpy,
memcmp, memset, memmove? Would you please write a complete list of the
cases when compiler does that for -nostdlib. Why the manual of gcc
does not talk about such an important subject.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux