This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Compiling functions without return type.



Hi,

is there a way to compile following code using g++:

#include <stdio.h>

f();  // Function defination w/o return type

int main(int argc, char *argv[])
{
        f();
        return 0;
}

f()
{
        printf("%d",1);
        return 0;
}

I know this is against ANSI standards, but I have some header files,
defining functions like this.

Amol


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]