This is the mail archive of the gcc-bugs@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]

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


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