From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15299 invoked by alias); 24 Feb 2003 02:36:21 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 15292 invoked from network); 24 Feb 2003 02:36:20 -0000 Received: from unknown (HELO ginsberg.uol.com.br) (200.221.29.48) by 172.16.49.205 with SMTP; 24 Feb 2003 02:36:20 -0000 Received: from 200-221-229-197.internetturboadsl.speeduol.com.br ([200.221.229.197]) by ginsberg.uol.com.br (8.9.1/8.9.1) with ESMTP id XAA03938 for ; Sun, 23 Feb 2003 23:33:44 -0300 (BRT) Subject: Re: First basic program From: "Samuel T. Santos" To: GCC-Help In-Reply-To: <3E593598.1050502@fastmail.fm> References: <1045958024.1833.39.camel@samuca.br> <1046026808.2026.2.camel@samuca.br> <3E593598.1050502@fastmail.fm> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: Mon, 24 Feb 2003 02:36:00 -0000 Message-Id: <1046054283.2792.18.camel@samuca.br> Mime-Version: 1.0 X-SW-Source: 2003-02/txt/msg00216.txt.bz2 then its a padronization of GCC to declare return type of main a int I will read them! thanks!=20 til more Em Dom, 2003-02-23 =E0s 17:56, bjorn rohde jensen escreveu: > Hi there, >=20 > Opinions differ, but it has always been my understanding > that main should be declared as returning int:) gcc seems > to think so too. > The reason, you get a file by the name "a.out", is simply, > that you have not told gcc to call it anything, so it uses > the traditional default. You should be aware, that creating > an executable conceptually involves 2 steps; the generation > of a number of object files from their source .c files, and > secondly the linking of the object files with various libraries > to form the executable. In your case, gcc does both. > Some commonly used options to gcc are; -ansi -pedantic -Wall > -O3, -c and -o. The first 3 are to get gcc to check/warn about > a lot of possible mistakes, which might technically be legal, > but unlikely to be the intention and to reject programs using > platform specific extensions for better portability. The others > and plenty more, you can read all about in the nice man pages > for gcc:) >=20 > Yours sincerely, >=20 > Bjorn >=20