This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug target/16000] for h8 targets variadic functions are not working properly
- From: Graham Stott <graham dot stott at btinternet dot com>
- To: gcc-bugzilla at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Jun 2004 15:26:54 +0100 (BST)
- Subject: Re: [Bug target/16000] for h8 targets variadic functions are not working properly
>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