[gnu.g++.bug] ___main undefined

chatty%FRLRI61.BITNET@CUNYVM.CUNY.EDU (09/18/89)

For the following code, g++ 1.36.0-, using gcc 1.35.99, produces
the following assembler output, on a sun3 os3.5 .

main ()
{
        printf ("hello\n");
}

#NO_APP
gcc_compiled.:
.text
LC0:
        .ascii "hello\12\0"
        .even
.globl _main
_main:
        link a6,#0
        movel d2,sp@-
        jbsr ___main
        movel d0,d2
        pea LC0
        jbsr _printf
        addqw #4,sp
        clrl d0
        jra L1
L1:
        movel a6@(-4),d2
        unlk a6
        rts

What is this ___main function, and where is it found?

Stephane Chatty         chatty@frlri61.bitnet
                        chatty@lri.lri.fr

tiemann@SUN.COM (Michael Tiemann) (09/19/89)

It is in the latest libg++

Michael