This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: __main?


On Jan 26, 2001, Axel Kittenberger <Anshil@gmx.net> wrote:

> Okay if I create a __main that's empty the linker will be happy, right?

It may work, yes.  But then, it may break later.

> Hmmm gcc, did not protest when I called main();....

Not even with -W -Wall -ansi -pedantic?

> Other question, is gcc capable of letting me switching sections, so
> like I've some few global variables that I want to reside in a
> special section, or some startup code witch is required to be on the
> first code page?

Look for `section' in ``Variable attributes'', in the GCC manual.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]