From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15001 invoked by alias); 4 Dec 2004 15:56:42 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 14976 invoked from network); 4 Dec 2004 15:56:36 -0000 Received: from unknown (HELO develer.com) (151.38.19.110) by sourceware.org with SMTP; 4 Dec 2004 15:56:36 -0000 Received: (qmail 13647 invoked from network); 4 Dec 2004 15:56:34 -0000 Received: from unknown (HELO mimas) (10.3.3.245) by trinity.trilan with SMTP; 4 Dec 2004 15:56:34 -0000 Message-ID: <0b2501c4da19$d42a8350$f503030a@mimas> From: "Giovanni Bajo" To: "Ernest L. Williams Jr." Cc: References: <1102169587.3660.27.camel@lion> <0af601c4da14$a47293f0$f503030a@mimas> <1102175011.6750.17.camel@lion> Subject: Re: tree_list not supported by dump_type (Historical Question) Date: Sat, 04 Dec 2004 15:56:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-SW-Source: 2004-12/txt/msg00222.txt.bz2 Ernest L. Williams Jr. wrote: >> Do you have a testcase? > ============================================================================ ========== > #include > > int incr(int i){return ++i;} > > main() > { > int (*dummy)(...); > dummy=incr; > (void)printf("%d\n",dummy(1)); > return(0); > } > ============================================================================ ============= > > > The above code should yield the error I mention under gcc-2.95 2.95 is five years old and unsupported at this point. With a current GCC release (3.4.2), I get this: GNU C++ version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) (i386-redhat-linux) compiled by GNU C version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3). GGC heuristics: --param ggc-min-expand=33 --param ggc-min-heapsize=6250 bahf.cc:6: warning: ISO C++ forbids declaration of `main' with no type bahf.cc: In function `int main()': bahf.cc:8: error: invalid conversion from `int (*)(int)' to `int (*)(...)' So whatever that patch is, it is not required anymore. -- Giovanni Bajo