From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32234 invoked by alias); 15 Jun 2004 14:27:01 -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 32085 invoked from network); 15 Jun 2004 14:26:57 -0000 Received: from unknown (HELO web86111.mail.ukl.yahoo.com) (217.12.12.56) by sourceware.org with SMTP; 15 Jun 2004 14:26:57 -0000 Message-ID: <20040615142654.98565.qmail@web86111.mail.ukl.yahoo.com> Received: from [194.200.65.239] by web86111.mail.ukl.yahoo.com via HTTP; Tue, 15 Jun 2004 15:26:54 BST Date: Tue, 15 Jun 2004 14:27:00 -0000 From: =?iso-8859-1?q?Graham=20Stott?= Subject: Re: [Bug target/16000] for h8 targets variadic functions are not working properly To: gcc-bugzilla@gcc.gnu.org, gcc-bugs@gcc.gnu.org In-Reply-To: <20040615141234.16588.qmail@sourceware.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2004-06/txt/msg01846.txt.bz2 List-Id: >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