avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] How to warn if a function called with extra arguments


From: Tom Harris
Subject: [avr-gcc-list] How to warn if a function called with extra arguments
Date: Mon, 22 Mar 2004 17:53:48 +1100

Greetings,

Here is an example of code that compiles with no warnings:

void f() {
}

void g() {
        f(1); // extra argument
}

I know that it is harmless, but s there a way to persuade gcc to print a
warning in such cases?

If I declare f as `f(void)` then the compiler complains about the extra
argument. 

Compiler options are `-c -g -Os -mcall-prologues  -fshort-enums
-fpack-struct  -Wall -W -Wno-main -mmcu=atmega32 -std=gnu99"

Thanks

TomH

_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list


reply via email to

[Prev in Thread] Current Thread [Next in Thread]