public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* suggestion for GCC (1)
@ 2011-02-07 10:23 ali hagigat
  2011-02-07 10:26 ` Kai Ruottu
  2011-02-07 23:43 ` Ian Lance Taylor
  0 siblings, 2 replies; 18+ messages in thread
From: ali hagigat @ 2011-02-07 10:23 UTC (permalink / raw)
  To: gcc-help

A necessary feature for GCC is to compile C/Assembly programs without
standard libraries for Intel architectures.

^ permalink raw reply	[flat|nested] 18+ messages in thread
* suggestion for GCC (1)
@ 2011-02-09  5:17 ali hagigat
  2011-02-09  5:27 ` Ian Lance Taylor
  0 siblings, 1 reply; 18+ messages in thread
From: ali hagigat @ 2011-02-09  5:17 UTC (permalink / raw)
  To: gcc-help, Ian Lance Taylor, david, thomas.martitz

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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-03-06 13:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-07 10:23 suggestion for GCC (1) ali hagigat
2011-02-07 10:26 ` Kai Ruottu
2011-02-07 10:29   ` Kai Ruottu
2011-02-07 10:57     ` ali hagigat
2011-02-07 11:03     ` ali hagigat
2011-02-07 23:43 ` Ian Lance Taylor
2011-02-08  0:44   ` Thomas Martitz
2011-02-08  7:35     ` Ian Lance Taylor
2011-02-08 14:23       ` David Brown
2011-02-09  4:54         ` Ian Lance Taylor
2011-02-09  5:17 ali hagigat
2011-02-09  5:27 ` Ian Lance Taylor
2011-02-09  6:03   ` ali hagigat
2011-02-09  7:05     ` ali hagigat
2011-02-09 10:26       ` Ian Lance Taylor
2011-02-09 15:23       ` David Brown
2011-03-06 13:19         ` Enrico Weigelt
2011-02-09  7:08     ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).