tree_list not supported by dump_type (Historical Question)

Giovanni Bajo rasky@develer.com
Sat Dec 4 15:56:00 GMT 2004


Ernest L. Williams Jr. <ernesto@ornl.gov> wrote:

>> Do you have a testcase?
>
============================================================================
==========
> #include <stdio.h>
>
> 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



More information about the Gcc mailing list