From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 824 invoked by alias); 15 Jun 2004 14:27:42 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 814 invoked by alias); 15 Jun 2004 14:27:41 -0000 Date: Tue, 15 Jun 2004 14:27:00 -0000 Message-ID: <20040615142741.812.qmail@sourceware.org> From: "graham dot stott at btinternet dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040615140513.16000.manishas@kpitcummins.com> References: <20040615140513.16000.manishas@kpitcummins.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/16000] for h8 targets variadic functions are not working properly X-Bugzilla-Reason: CC X-SW-Source: 2004-06/txt/msg01847.txt.bz2 List-Id: ------- Additional Comments From graham dot stott at btinternet dot com 2004-06-15 14:27 ------- Subject: Re: 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 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16000