|
Brian Lewis wrote:
I think that the error I was reporting earlier about missing prototypes has something to do with the source files being located in the IFS. I put this test.c in / and CRTCMOD it. #include <stdio.h> void foo(); void foo() { puts("hi"); } int main() { foo(); } I receive CZM0304(10) No function prototype given for 'foo'. The same program compiled from a C member of a source physical file doesn't have the problem. V5R2.
I get the same message compiling from a source physical file on v5r2. If you change your prototype to have "void" where the parameters go, you won't have that problem. I think that "void foo();" is considered to be an incomplete prototype, where the parameters are not defined yet. Try this: #include <stdio.h> void foo(void); void foo() { puts("hi"); } int main() { foo(); }
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.