public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Wayne Willson" <wmw_will@yahoo.com>
To: help-gcc@gnu.org
Subject: Newbie gcc question
Date: Thu, 30 Sep 1999 23:56:00 -0000	[thread overview]
Message-ID: <zNVC3.6304$N77.506041@typ11.nn.bcandid.com> (raw)
Message-ID: <19990930235600.HSC5DME_AZ2boThryIXD4wJefB4jSpPx2GPK8k4n3n8@z> (raw)

I'm a sys/network admin trying to learn C (this could be the root of the
problem) with the GNU C compiler.

In a learning C book I just bought it gives this example

--------------------------------------------
#include <stdio.h>

viod main()
{
        printf("Hello Universe");
}



I type "gcc -o hello hello.c"

This is what I get "hello.c: In function `main':
hello.c:6: warning: return type of `main' is not `int'"
------------------------------------------------------

When I try this it works:
#include <stdio.h>

int main()
{
        printf("Hello Universe");
}

------------------------------------------------

This works as well

#include <stdio.h>

main()
{
        printf("Hello Universe");
}

-------------------------------------

Could someone tell me why gcc doesn't work with 'void'  but works with 'int'
and '   ' ?

Thanks






             reply	other threads:[~1999-09-30 23:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-12 15:32 Wayne Willson [this message]
1999-09-12 15:47 ` Tim Prince
1999-09-30 23:56   ` Tim Prince
1999-10-01  0:00   ` Tim Prince
1999-09-12 21:47 ` Chris Gregory
1999-09-30 23:56   ` Chris Gregory
1999-10-01  0:00   ` Chris Gregory
1999-09-30 23:56 ` Wayne Willson
1999-10-01  0:00 ` Wayne Willson
1999-10-13 15:54 newbie " Maggie Owens
1999-10-13 16:09 ` Matthew Majka
1999-10-14  0:05   ` Johan Nilson
1999-10-14  9:58     ` Matthew Majka
1999-10-31 13:57       ` Matthew Majka
1999-10-31 13:57     ` Johan Nilson
1999-10-31 13:57   ` Matthew Majka
1999-10-13 22:53 ` Konstantinos Adamopoulos
1999-10-31 13:57   ` Konstantinos Adamopoulos
1999-10-14 12:25 ` Maggie Owens
1999-10-31 13:57   ` Maggie Owens
1999-10-31 13:57 ` Maggie Owens
2002-04-29 18:21 Michael Kahle
2002-04-29 18:45 ` Claudio Bley
2002-04-29 19:48 ` Andrea 'Fyre Wyzard' Bocci
2002-04-29 19:51 Michael Kahle
2002-04-29 20:14 Michael Kahle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='zNVC3.6304$N77.506041@typ11.nn.bcandid.com' \
    --to=wmw_will@yahoo.com \
    --cc=help-gcc@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).