A subroutine or intrinsic function was called without having been declared.
This usually indicates that the header file that declares this subroutine was not #included. When a subroutine is used without having been declared, many C and FORTRAN compilers generate an implicit declaration as "function returning integer." This behavior is a common cause of errors, because the compiler may generate incorrect code if the implicit declaration does not match the actual definition.
ID |
Observation |
Description |
---|---|---|
1 |
Call site |
The call that provoked the implicit declaration |
#include <stdio.h> // Note no #include for <math.h> ! int main(int argc, char **argv) { // sin is not declared, so compiler assumes int sin(); // next assignment converts "int" return value to double, // leading to unexpected result double d = sin(1.0); printf("sin(1) = %f\n", d); return 0; }
Copyright © 2010, Intel Corporation. All rights reserved.