home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.vms
- Path: sparky!uunet!haven.umd.edu!decuac!pa.dec.com!engage.pko.dec.com!e2big.mko.dec.com!adserv.enet.dec.com!winalski
- From: winalski@adserv.enet.dec.com (Paul S. Winalski)
- Subject: Re: C problem
- Message-ID: <1993Jan22.181543.26223@e2big.mko.dec.com>
- Lines: 31
- Sender: usenet@e2big.mko.dec.com (Mr. USENET)
- Reply-To: winalski@adserv.enet.dec.com (Paul S. Winalski)
- Organization: Digital Equipment Corporation, Nashua NH
- References: <9301201500.AA20662@anon.penet.fi>
- Date: Fri, 22 Jan 1993 18:15:43 GMT
-
-
- In article <9301201500.AA20662@anon.penet.fi>, an6034@anon.penet.FI writes:
- |>
- |>I have a very simple C question. I have a sample C program that compiles and
- |>runs fine in a Borland C++ environment.
- |>
- |>When I try to compile this program in a VAX/VMS (5.4-2) environment I get a
- |>warning message. I have looked up the error message but it doesn't mean a
- |>thing to me.
- |>
- |>Attached is the source and a sethost log of my compile.
- |>
- |>Please help a student with out a clue?
- |>
- |>********************************************************************************
- |>cc example_1.c
- |> void main(void){ /* begin main */
- |>%CC-W-INVMAINRETVAL, Return value of main function is not an integer type.
- |> At line number 8 in $DISK:EXAMPLE_1.C;24.
- |>
- |>%CC-I-SUMMARY, Completed with 0 error(s), 1 warning(s), and
- |> 0 informational messages.
- |> At line number 29 in $DISK:EXAMPLE_1.C;24.
- |>********************************************************************************
-
- A C main program must return a value of integer type. As the error message
- states, it is not legal in C to have a main program that does not return a
- value. This works on Borland C++ either because it's a Borland extension to
- the C language or because this is one of the differences between C anc C++.
-
- --PSW
-