X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Sun, 10 Feb 2002 13:22:59 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp AT delorie DOT com Subject: Re: Alignment problem In-Reply-To: <3C6586A1.C3AE5AC3@yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sat, 9 Feb 2002, CBFalconer wrote: > > [1] c:\c\hashlib>gcc -c -gp -v malloc.c ^^^ That should have been -pg, not -gp. > > Reading specs from c:/djgpp/lib/gcc-lib/djgpp/2.953/specs > > gcc version 2.95.3 20010315/djgpp (release) > > c:/djgpp/lib/gcc-lib/djgpp/2.953/cpp0.exe -lang-c -std=c89 -v -D__GNUC__=2 -D__ > > GNUC_MINOR__=95 -trigraphs -D__STRICT_ANSI__ -D__unix__ -D__i386__ -D__GO32__ -D > > __DJGPP__=2 -D__MSDOS__ -D__unix -D__i386 -D__GO32 -D__DJGPP=2 -D__MSDOS -Asyste > > m(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386) -gstabs+ -gp -W -Wall -pedan > > tic -Acpu(i386) -Amachine(i386) -D__i386 -D__i386__ -D__tune_pentium__ -imacros > > c:/djgpp/lib/djgpp.ver -remap malloc.c c:/djgpp/tmp\cc8K2mXk.i How did those "-gstabs+ -W -Wall" got into this this command? Did you edit your specs file or something? > > c:/djgpp/lib/gcc-lib/djgpp/2.953/cc1.exe c:/djgpp/tmp\cc8K2mXk.i -quiet -dumpba > > se malloc.c -ansi -gstabs+ -gp -W -Wall -pedantic -version -o c:/djgpp/tmp\ccNNoJKC.s It will never work to compile library functions with "-ansi -pedantic", so it's no use trying. If you want a paranoiac set of compiler switches that does work, use the ones in the file gcc.opt from djlsr203.zip (but drop the -nostdinc one, for obvious reasons). > > cc1.exe: warning: `-gp' not supported by this configuration of GCC Expected, because you should use -gp. > > GNU C version 2.95.3 20010315/djgpp (release) (djgpp) compiled by GNU C version > > 2.95.3 20010315/djgpp (release). > > malloc.c:61: syntax error before `int' > > malloc.c:74: syntax error before `int' > > malloc.c:82: syntax error before `BLOCK' > > malloc.c: In function `malloc': > > malloc.c:195: warning: implicit declaration of function `sbrk' > > malloc.c: At top level: > > malloc.c:229: syntax error before `BLOCK' Expected, because you shouldn't use -ansi -pedantic (ANSI C doesn't know about `inline'). > Should I be using gstabs+, gstabs, or g? It doesn't matter, any -gSOMETHING switch will do for profiling. > I assume that if malloc is linked before the library search the > library version will be omitted? Yes, of course: ld.exe is a one-pass linker. > All doubtless 2nd nature to you, but not to me. Hand holding > needed :-) Don't give up, help is on its way ;-)