Search for a smarter C cross reference.

Blair P. Houghton bph at buengc.BU.EDU
Mon Jun 5 05:00:17 AEST 1989


In article <4020 at ima.ima.isc.com> mmengel at cuuxb.ATT.COM (Marc W. Mengel) writes:
>> ...  I would appreciate knowing of a similar xref for the C language...
>
>	If you compile a program with the -g option, and run "nm" on
>	it, you will get a raw listing of the base information you 

Yes, but...

Why does it list the functions I declared to "return" void as being type
int()?

My guess is that it's probably because our nm(1) (Encore Multimax; Umax)
is older than its cc(1), but I think it might also have something to do
with nm's assumptions about what is actually in the object-file, and there
might be something missing (like a tag that would disambiguate the type
of a function declared either void() or int()) from the object file.

Anyone got a little more insight on this?

				--Blair
				  "No doubt you are all thinking 'no
				   doubt about it'; but, no flame could
				   surprise me, educate me, or be of any
				   other value to me or the rest of the
				   world, so why would you bother?  Answer
				   the question and we can all get home in
				   time to kiss the kids goodnight."



More information about the Comp.lang.c mailing list