Re: (long) An AES implementation for 32-bit platforms

From: Richard Heathfield (dontmail_at_address.co.uk.invalid)
Date: 06/11/03


Date: Wed, 11 Jun 2003 06:25:12 +0000 (UTC)

Mok-Kong Shen wrote:

<snip>

>
> One should use int main() according to
> the new C standard, if I don't err.)

Indeed. And according to the old C standard, too. And before that, there was
no such thing as void anyway. void main() has never been correct in C or in
C++ (although it is correct in Java, oddly enough).

-- 
Richard Heathfield : binary@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton


Relevant Pages

  • Re: Compiler Error
    ... is preferred to "void main" ... I'd have used a stronger expression than that. ... actually requires int in almost all situations in which the Standard ...
    (comp.lang.c)
  • Re: Question about pointers?
    ... > with the exception of the void fileexistcheckthat is OS ... I hope the rest of it is totally standard. ... > int main ... > void selectfilename(string& filename) ...
    (comp.lang.cpp)
  • Re: Memory allocation for an initialized character pointer;
    ... where does the Standard explicitly mention void ... the Standard does not imply by that text that void mainis ... any more than the Standard implies by the same text that struct ... Neither does it imply that int mainis correct, because, as you ...
    (comp.lang.c)
  • Re: Legality of void main in C
    ... § 5.1.2.2.1.1 of the C ... Standard lists the allowable forms for the definition of main. ... If the return type is not compatible with int, ... an implementation is permitted to allow void main. ...
    (comp.lang.c)
  • Re: Inconsistent Program Results
    ... including one of them might trivially slow down compilation, ... I wrote the above (starting with "The standard headers"). ... return void, but there's no advantage in using that. ... You're cheating yourself by ignoring warning messages. ...
    (comp.lang.c)

Quantcast