|
If this were the case, it would manifest itself on all systems (not
just
AIX).
I'm gonna try to build this thing in PASE and see what I get.
On 5/13/2010 7:14 PM, Dennis Lovelady wrote:
I can only come up with one scenario that might produce the "warning:like
incompatible implicit declaration of built-in function malloc" error
this on AIX 5.3, given that<stdlib.h> is included in the source.That would
be the situation where some piece of code (perhaps a macro) uses themalloc
function before<stdlib.h> is included. See the following example:this:
void *myFunc(int size) {
void *ptr ;
ptr = malloc(size) ;
}
#include<stdlib.h>
int main(int argc, char *argv[]) {
char *dummy ;
dummy = myFunc(1024) ;
}
This could be innocently manifest with code that would look like
prototype.)
#include "myFunc.h"
#include<stdlib.h>
(where myFunc.h incorrectly contains the code rather than just a
Maybe
Unfortunately, I have yet to prove this theory on an AIX 5.3 system.
Alberto or Mark could?(I
Is it possible that repositioning the #include would provide benefit?
have yet to see the source.)
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.