Ethereal-dev: Re: [ethereal-dev] AIX: gtk problem solved, now an ethereal problem

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Craig Rodrigues <rodrigc@xxxxxxxxxxxx>
Date: Wed, 10 Nov 1999 16:38:11 -0500
Hi,

Well, since everyone on this list has been so helpful
to me in helping me get Ethereal to work under AIX,
I was wondering if someone could help.

With the AIX C compiler, if I have the following program, a.c:

int foo(int a, int b, int c){ return 0; }

int main(int argc, char **argv){
     foo(5, 3);
     return 0;
}

If I compile this program, the compiler generates a non-fatal
warning:
"a.c", line 7.5: 1506-098 (E) Missing argument(s).

Since this error is non-fatal, the return code from the compiler is 0,
and an a.out binary is generated.  I consider this a bug, because
every other C compiler I've used (Sun, gcc) don't let this pass.

When I phoned IBM though, their support droid told me that this behavior
follows the ANSI standard spec for non-prototyped functions in C.
This sounds like hogwash to me, because the function I gave is fully
prototyped and defined.  I don't have a copy of the ANSI standard spec
on me, so I couldn't argue with the guy.

Does someone out there have access to the ANSI C spec?  Could you
tell me what the correct behavior is if you pass an incorrect number
of arguments to a C function (a regular function, not a varargs one).

AIX is beginning to piss me off, so if this is IBM's bug, I want them to
fix it. :)

P.S.  Sorry for the non-ethereal, non-networked, AIX-specific post. :)
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@xxxxxxxxxxxx