1752795 Members
5901 Online
108789 Solutions
New Discussion юеВ

Re: CC-W-NOTINCRTL

 
SOLVED
Go to solution
Bill Pedersen
Regular Advisor

CC-W-NOTINCRTL

Ok, it has been a while since I have delved into "C" on OpenVMS, but having plunged in I get:

double round (double a)
.......^
%CC-W-NOTINCRTL, Identifier "round" is reserved by the C99 standard and will be mapped to "MATH$ROUND_T" although it is not available in the CRTL available to the compiler.

Now, while this is an interesting warning, if I do not have the function "round" defined in my code then it comes up an UNDEFINED SYMBOL in the LINK. So, to me, this is not really a warning but an error...

I am correct in thinking that if I have it defined properly with a substitute function that this will then work as expected?

I also note that CC-W-NOTINCRTL is not defined in the HELP/MESSAGE NOTINCRTL facility.

Thanks,

Bill.
Bill Pedersen
CCSS - Computer Consulting System Services, LLC
5 REPLIES 5
Hoff
Honored Contributor
Solution

Re: CC-W-NOTINCRTL

The round() function name is a reserved function in C99, and the HP C compiler implements some of C99, while the RTL doesn't.

As for the error...

----

$ help cc message NOTINCRTL

CC

Messages

NOTINCRTL


Message Identifier "" is reserved by the
standard and will be mapped to
"" although it is not available in the CRTL
available to the compiler.

Description The specified identifier is reserved for use as an
identifer with external lingage in the specified
version of the C standard. But according to the CRTL
mapping table available to the compiler, that
identifier is not defined in the CRTL you expect to
link against. This may be because the function or
object is not yet implemented in the current
DECC$SHR, or because you have used logical
DECC$CRTLMAP to specify a CRTL mapping table for a
version of the CRTL that does not implement it.

User Action If you intended to use the identifier as defined by
the C standard, and you have not defined the logical
DECC$CRTLMAP, then the identifier is not defined in
the DECC$SHR available to the compiler. If this is
the latest released DECC$SHR, then the identifier is
not yet implemented and you need to consider
workarounds; otherwise you should upgrade to the
latest available CRTL that does implement it. If you
did not intend to use the identifier as defined by
the C standard (i.e. it is an identifier you
expected to be defined by your application), then you
have a name clash with the specified version of the
standard and you should change the spelling of the
identifier; alternatively, you could disable
prefixing for it using /PREFIX=EXCEPT=, or specify an
older version of the standard with either /PREFIX= or
/STANDARD=.

----


(Odd, too, that the message file references C2010, and that's also called C1X, and it's not ready quite yet.)
Bill Pedersen
Regular Advisor

Re: CC-W-NOTINCRTL

Thanks, Hoff!

I will run with this information.

Bill.
Bill Pedersen
CCSS - Computer Consulting System Services, LLC
Bill Pedersen
Regular Advisor

Re: CC-W-NOTINCRTL

Hoff's response should close this out.

Thanks,

Bill.
Bill Pedersen
CCSS - Computer Consulting System Services, LLC
Craig A Berry
Honored Contributor

Re: CC-W-NOTINCRTL

An alternative way to fiddle with the prefix is to do something like:

#pragma extern_prefix save
#pragma extern_prefix "bills_personal_" (round)
double round (double a);
#pragma extern_prefix restore

WW304289
Frequent Advisor

Re: CC-W-NOTINCRTL

DPML does not have MATH$ROUND_x function but has MATH$LROUND_x functions (x is a floating point format indicator). lround(), which maps to MATH$LROUND_x, is listed in the C RTL entries table and, therefore, does not trigger the %CC-W-NOTINCRTL warning.

Depending on what you need, you may consider using lround().

-Boris