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]

Trying to find a gcc warning to detect different parameter names


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;
}


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