Pelles C 4.0 doesn't compile this (redeclaration, error #2120):
int a() {
void b();
}
static void b() {
}
Thanx, if you could have a look on this!
You have reversed the proper order try this:
static void b() {
}
int a() {
void b();
}
or use a prototype for void b()
also you do not need to prepend keyword "void" to b when you are calling it from within a.
int a() {
b();
}
-DMac
int a() {
void b();
}
static void b() {
}
That's because you are prototyping the b() function twice. If you wish to typecast, you must encapsulate the cast in parethesis like so
#include <stdio.h>
static void b ( void );
int a ( void );
int a() {
(void) b();
return ( 0 );
}
static void b() {
}
int main () { return ( a ( ) ); }
To note another possible error, in you code you define a() as an int but don't return anything. None the less, the code above compiles without a hitch as a console app.
Regards,
Bryant Keller