Hello

I am looking for a gcc option to give a warning when parameter names don't match between the prototype in C, and the definition. Could someone point me to the option if there is one please.

Example provided below, where "offset" miss-spelt "offest". (I found -Wstrict-prototypes, but that only warns if types are not specified.). Would be quite handy to have this ability to check parameter names are consistent.

Please include my email address in any replies.

Best regards, Jon




gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2


// gcc -Wall -o main main.c

#include <stdio.h>

void test_func(int offest);


void test_func(int offset)
{
        printf("%d\n", offset);
}

int main(void)
{
        test_func(1);

        return 0;
}

Reply via email to