public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* tree_list not supported by dump_type (Historical Question)
@ 2004-12-04 14:13 Ernest L. Williams Jr.
  2004-12-04 15:19 ` Giovanni Bajo
  0 siblings, 1 reply; 3+ messages in thread
From: Ernest L. Williams Jr. @ 2004-12-04 14:13 UTC (permalink / raw)
  To: GCC; +Cc: ernesto

Hi,

When the following message occured in gcc-2.95 it was addressed in
gcc-2.95.1
===============================================================================
new_test1.cc:14: sorry, not implemented: `tree_list' not supported by
dump_type
new_test1.cc:14: ANSI C++ prohibits conversion from `()' to `(...)'
===============================================================================

Looks like the following files were modified to achieve this:
"gcc/gcc/cp/error.c"  and  "gcc/gcc/cp/typeck.c"


Did this fix survive in gcc-3.X.X?   Was this considered a compiler and
later as GCC became more
ISO C++ compliant the patch was removed?   Any help in understanding is
appreciated.




====== snippet from gcc/gcc/cp/typeck.c in gcc-2.951  ===========
--- 1355,1367 ----

    if (t1 == 0 && t2 != 0)
      {
!       if (! flag_strict_prototype && t2 == void_list_node)
!       /* t1 might be the arglist of a function pointer in extern "C"
!          declared to take (), which we fudged to (...).  Don't make
the
!          user pay for our mistake.  */;
!       else
!       cp_pedwarn ("ANSI C++ prohibits conversion from `%#T' to `
(...)'",
!                   parms2);
        return self_promoting_args_p (t2);
      }
    if (t2 == 0)
***************
*** 6360,6366 ****

Thanks,
Ernest L. Williams Jr.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tree_list not supported by dump_type (Historical Question)
  2004-12-04 14:13 tree_list not supported by dump_type (Historical Question) Ernest L. Williams Jr.
@ 2004-12-04 15:19 ` Giovanni Bajo
       [not found]   ` <1102175011.6750.17.camel@lion>
  0 siblings, 1 reply; 3+ messages in thread
From: Giovanni Bajo @ 2004-12-04 15:19 UTC (permalink / raw)
  To: Ernest L. Williams Jr.; +Cc: gcc

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

> Did this fix survive in gcc-3.X.X?   Was this considered a compiler and
> later as GCC became more
> ISO C++ compliant the patch was removed?   Any help in understanding is
> appreciated.

Do you have a testcase?
-- 
Giovanni Bajo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tree_list not supported by dump_type (Historical Question)
       [not found]   ` <1102175011.6750.17.camel@lion>
@ 2004-12-04 15:56     ` Giovanni Bajo
  0 siblings, 0 replies; 3+ messages in thread
From: Giovanni Bajo @ 2004-12-04 15:56 UTC (permalink / raw)
  To: Ernest L. Williams Jr.; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-12-04 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-04 14:13 tree_list not supported by dump_type (Historical Question) Ernest L. Williams Jr.
2004-12-04 15:19 ` Giovanni Bajo
     [not found]   ` <1102175011.6750.17.camel@lion>
2004-12-04 15:56     ` Giovanni Bajo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).