Path: utzoo!attcan!uunet!samsung!brutus.cs.uiuc.edu!psuvax1!psuvm!cmh117 From: CMH117@PSUVM.BITNET (Charles Hannum) Newsgroups: comp.lang.c Subject: void main() Message-ID: <89321.113706CMH117@PSUVM.BITNET> Date: 17 Nov 89 16:37:06 GMT Organization: Penn State University Lines: 17 The basic problem is that you ass/u/me that the compiler will always return values in a register. If this is the case, then fine. But it is emphatically **NOT** the case. Making such gross assumptions about the way any particular compiler works is just begging for trouble. C was never defined to return values on the stack. The way this is done may vary from compiler to compiler, and to ass/u/me it does it one particular way makes your code non-portable. If all you want to do is disable the warning, just add a return(0) at the end of your main() function. Even if it isn't optimized out, it will only take a couple of bytes. This is a much better alternative than declaring main() as a void. -- - Charles Martin Hannum II "Klein bottle for sale ... inquire within." (and PROUD OF IT!!!) "To life immortal!" c9h@psuecl.psu.edu "No noozzzz izzz netzzzsnoozzzzz..." cmh117@psuvm.psu.edu "Mem'ry, all alone in the moonlight ..."