*BSD News Article 9714


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA6338 ; Fri, 08 Jan 93 04:12:27 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!network.ucsd.edu!usc!cs.utexas.edu!sun-barr!sh.wide!wnoc-tyo-news!news.u-tokyo.ac.jp!yayoi!tansei1!mhiroshi
From: mhiroshi@tansei.cc.u-tokyo.ac.jp (H. Murakami)
Newsgroups: comp.unix.bsd,fj.os.386bsd
Subject: [386bsd] Strange behavior of the system.
Message-ID: <3871@tansei1.tansei.cc.u-tokyo.ac.jp>
Date: 10 Jan 93 16:35:37 GMT
Sender: news@tansei.cc.u-tokyo.ac.jp
Followup-To: comp.unix.bsd
Organization: Hokkaido Univ. However I am subject to tansei for JUNET.
Lines: 40

To: comp.unix.bsd,fj.os.386bsd
Subject: [386bsd] Strange behavior of the system.

I encountered a unbelieavable behavior of the system now.
If I linked the object files using gcc2 then the executable
outputs just two warning.
However, if I make the object archive first, and then
link is made using the gcc2 for the object and the library,
the result is different!

How this can be possible????

 

Script started on Sun Jan 10 11:50:05 1993
% ls -l *.o
-rw-r--r--    1 hiroshi       779 Jan 10 11:46 atof.o
-rw-r--r--    1 hiroshi     70373 Jan 10 11:46 enquire.o
-rw-r--r--    1 hiroshi      8045 Jan 10 11:46 vfprintf.o
% 
% 
% gcc2 enquire.o atof.o vfprintf.o -o a.out
% a.out | grep WARNING
*** WARNING: Possibly bad output from printf above
*** WARNING: Possibly bad output from printf above
% 
% rm mylib.a
% ar ruv mylib.a atof.o vfprintf.o
ar: creating archive mylib.a.
a - atof.o
a - vfprintf.o
% ranlib mylib.a
% gcc2 enquire.o mylib.a -o a.out
% a.out | grep WARNING
*** WARNING: Possibly bad output from printf above
*** WARNING: Possibly bad output from printf above
*** WARNING: Possibly bad output from printf above
*** WARNING: Possibly bad output from printf above
% exit
Script done on Sun Jan 10 11:51:12 1993