[Bug target/16000] for h8 targets variadic functions are not working properly

Graham Stott graham.stott@btinternet.com
Tue Jun 15 14:27:00 GMT 2004


>Consider the  attached test case for H8 target in which variadic function is 
>declared to take variable number of  arguments but in the definition fixed 
>number of arguments are used.  This is allowed in gcc as per document in  
>http://www.gnu.org/software/libc/manual/html_node/Why-Variadic.html#Why%
>20Variadic

I think the statments made in the above link regarding variadic functions
are plainly wrong. It may work for sometimes for some targets but definately
not for all targets. The reason is the compiler may and can pass arguments
differently depending on the prototype and especially for varadic functions.

Both the declaration and definition should agree mixing them isn't going to
work.

Graham



More information about the Gcc-bugs mailing list