This is the mail archive of the gcc@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]
Other format: [Raw text]

Is this a bug?


two c files: main.c and func.c, excute the command like this:

gcc main.c func.c -Wall -ansi -pedantic

there are two warnings, and is can generate binary file and the file
can be excuted.

//main.c

int main()
{
    int a;
    a = func();
    printf("%d\n", a);
    return a;
}

//func.c
float func(int a, int b)
{
    return (float)(a + b);
}

I assume it's a bug:  func in main funcion is different from the
function in func.c

My gcc version is gcc 3.2.2.

May be not this version, i have forgotten.


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