Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!sysjj.mdcbbs.com!hooverm From: hooverm@sysjj.mdcbbs.com (SQUID 6 on the DARK side) Newsgroups: comp.lang.c Subject: Is void main(void) ANSI standard?? Message-ID: <1991Mar11.085439.1@sysjj.mdcbbs.com> Date: 11 Mar 91 08:54:39 GMT Organization: McDonnell Douglas M&E, Cypress CA Lines: 21 Nntp-Posting-Host: sysjj Nntp-Posting-User: hooverm This is my first posting to this group ( I read the FAQ first!!). My question is basic and regarding the function main(). When a program is compiled/linked and there is no value returned to main, certain platforms will return a warning message stating that this function doesn't return a value. I thought that by declaring: void main(void) that I would get around this. Is this ANSI standard? If it is valid, why doesn't my SUN SparcStation like it? Is it possible to write code that will not kick out ANY warning messages when compiled, regardless of the platform or error message level?? I write for Borland (PC), UNIX (HP & SUN), as well as VMS (VAX) and this is giving me fits!! Please reply by E-Mail and I will summarize if there is sufficient interest. Mark