Operating System - OpenVMS
1827791 Members
2901 Online
109969 Solutions
New Discussion

Re: Exit is implicitly declared as a function

 
SOLVED
Go to solution
ram_47
Frequent Advisor

Exit is implicitly declared as a function

Hi,

Though this is an informational message only, would like to know what it means. Also, is there a way to get rid of it?

exit(0);
.......^
%CC-I-IMPLICITFUNC, In this statement, the identifier "exit" is implicitly
declared as a function.
15 REPLIES 15
Kris Clippeleyr
Honored Contributor
Solution

Re: Exit is implicitly declared as a function

Ram,

HELP CRTL exit

is your friend.

Simply include stdlib.h, like

#include

Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Kris Clippeleyr
Honored Contributor

Re: Exit is implicitly declared as a function

Ram,
Also:

HELP CC Messages IMPLICITFUNC

Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
ram_47
Frequent Advisor

Re: Exit is implicitly declared as a function

<>

I cannot access this. It says no documentation. I tried looking for 'Messages' under CC/VAXC but it is not listed there.
Kris Clippeleyr
Honored Contributor

Re: Exit is implicitly declared as a function

Ram,

I'm using Compaq C V6.4-005 on OpenVMS VAX, HP C V7.1-011 on OpenVMS IA64 V8.2, and Compaq C V6.5-001 on OpenVMS Alpha V7.3-1; and all these versions have HELP CC MESSAGES.
What's your configuration?

Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
ram_47
Frequent Advisor

Re: Exit is implicitly declared as a function

Is there a way to check the configuration? The only thing I know about my VMS box is -
VAX/VMS Version V6.2, because it appears after logon :)
Kris Clippeleyr
Honored Contributor

Re: Exit is implicitly declared as a function

Ram,

write sys$output f$getsyi("HW_NAME")
gives what type of box you're working on;

write sys$output f$getsyi("ARCH_NAME")
gives the architecture (VAX, Alpha, IA64);

write sys$output f$getsyi("VERSION")
gives the version of VMS.

CC/VERSION
gives the version of the C compiler (at least with the more recent ones).

Also, you might look in SYS$HELP for the release notes of the C compiler.
Execute:

directory sys$help:*cc*.release_notes

You might see something like

Directory SYS*COMMON:[SYSHLP]

CC065.RELEASE_NOTES

This also tells me that I have version 6.5 of the C compiler.

Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
ram_47
Frequent Advisor

Re: Exit is implicitly declared as a function

write sys$output f$getsyi("HW_NAME")
VAX 4000-700A

write sys$output f$getsyi("ARCH_NAME")
VAX

write sys$output f$getsyi("VERSION")
V6.2

CC/VERSION
DEC C V5.6-003 on OpenVMS VAX V6.2
Kris Clippeleyr
Honored Contributor

Re: Exit is implicitly declared as a function

Ram,

I don't have access to a configuration similar to yours. But the help info on the CC command lists the "messages" topic under /DECC on one of our VAXes running V6.2 and DEC C V6.0 installed.

Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
ram_47
Frequent Advisor

Re: Exit is implicitly declared as a function

Sorry, but am still unable to find that topic.
Kris Clippeleyr
Honored Contributor

Re: Exit is implicitly declared as a function

Ram,

Here is an excerpt of how I have found the info about IMPLICITFUNC on one of our VAXes.

Btw, going on holidays in 15 minutes.

Greetz,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Antoniov.
Honored Contributor

Re: Exit is implicitly declared as a function

Hi,
IMPLICITFUNC tell you function exit() is not declared as that.
I guess you compile with ANSI compliance; since 1999, in C language you must declare any fucntion with prototype while ancient Ritchie & Kerningha C doesn't need of it.
Prototype of exit is in stdlib, so you must add
#include
on top of your source file.

Antonio Vigliotti
Antonio Maria Vigliotti
Antoniov.
Honored Contributor

Re: Exit is implicitly declared as a function

Again,
for help execute follow steps:
Type
$ HELP CC
see list of options; press RETURN until can see messages;
type MESSAGES (without abbreviation)
see list of messages; press RETURN until you can see IMPLICITFUNC;
type IMPLICIT and read message text.
I guess you try to abbreviate MESSAGES while help has MESSAGES_GROUP and MESSAGES choices.

Antonio Vigliotti
Antonio Maria Vigliotti
ram_47
Frequent Advisor

Re: Exit is implicitly declared as a function

thanks, am able to see it now. looks like i missed it. sorry about that.

also, how did u redirect your screen output to a file? was it copy-paste or using some command?
Antoniov.
Honored Contributor

Re: Exit is implicitly declared as a function

Most of vms commands use /OUT qualifier to redirect output like greater than symbol > of unix.
So you can type
$ HELP CC MESSAGES IMPLICIT /OUT=

Antonio Vigliotti
Antonio Maria Vigliotti
Kris Clippeleyr
Honored Contributor

Re: Exit is implicitly declared as a function

Ram,

Redirecting the output was easy.

From one of our systems

$ SET HOST/LOG ITM2

Login into ITM2, do whatever you like, finally logout, and lo and behold the file SETHOST.LOG is created containing the output.

I'm off now, speak to you later.

Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...