Jeffrey Altman wrote:
> 
> > Richard Levitte - VMS Whacker <[EMAIL PROTECTED]> ,in message <20000202220
> >       [EMAIL PROTECTED]>, wrote:
> >
> > > I think the real problem is that an attempt is made to compile stack.c
> > > as a C++ file, not a C one.  What should be done is to tell the
> > > compiler that it shouldn't use C++ semantics...
> >
> >   #include it within an extern "C" { } ?  I'm not sure if that's going to be
> > effective.
> >
> >   I guess it's just an error to try to compile C with a C++ compiler.  You
> > don't try to compile pascal with a fortran compiler, eh?
> 
> The Visual C++ compiler does not compile a  .c file with C++ semantics
> unless a special command line switch is thrown.  stack.c is being
> compiled as a ANSI C program.  The compiler is correct.
> 
>   void (*func)()
> 
> means
> 
>   void (*func)(void)
> 
> in ANSI C.
> 
>   func(foo);
> 
> calls func() with a single parameter which is one more parameter than
> the function pointer is declared to accept.

Not according to K&R Ed. 2 - they say that void (*func)() is equivalent
to void (*func)(...).

Cheers,

Ben.

--
SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm

http://www.apache-ssl.org/ben.html

Y19100 no-prize winner!
http://www.ntk.net/index.cgi?back=2000/now0121.txt
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to