public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re:  A patch for g++
@ 1998-05-07 17:39 Andrew Macleod
  1998-05-07 21:59 ` No prototype for is_java_type H.J. Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Macleod @ 1998-05-07 17:39 UTC (permalink / raw)
  To: hjl; +Cc: egcs

>> Hi,
>> 
>> Your change:
>> 
>> Tue May  5 18:24:13 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
>>  
>> 	* method.c: Add a call to build_type_variant to get the right type.
>> 
>> breaks c++. A testcase is enclosed here. The patch below seems to fix
>> the bug for me. Can you take a look at it?

It was already broken.. this fixed some of it, but apparently not all, and
caused other things to break. Figures :-)

Thanks for the testcase and the patch. I elected to change the area where
the other TREE_USED flags are zeroed out instead, so its all done in
one place. I have applied the patch to egcs.

Andrew


>> BTW, is_java_type () is not declared anywhere.
>> 

It should be defined on line 1142 of method.c:

int
is_java_type (type)
     tree type;
{
...



(btw I applied the following:)
Index: method.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/cp/method.c,v
retrieving revision 1.190
diff -c -p -r1.190 method.c
*** method.c    1998/05/05 22:31:48     1.190
--- method.c    1998/05/07 21:24:26
*************** build_decl_overload_real (dname, parms,
*** 1620,1626 ****
            typevec = NULL;
            while (t)
              {
!               TREE_USED (TREE_VALUE (t)) = 0;
                t = TREE_CHAIN (t);
              }
          }
--- 1620,1631 ----
            typevec = NULL;
            while (t)
              {
!               tree temp = TREE_VALUE (t);
!               TREE_USED (temp) = 0;
!               /* clear out the type variant in case we used it */
!               temp = build_type_variant (TYPE_MAIN_VARIANT (temp),
!                     TYPE_READONLY (temp), TYPE_VOLATILE (temp));
!               TREE_USED (temp) = 0;
                t = TREE_CHAIN (t);
              }
          }


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

* No prototype for is_java_type
  1998-05-07 17:39 A patch for g++ Andrew Macleod
@ 1998-05-07 21:59 ` H.J. Lu
  1998-05-07 23:40   ` Jeffrey A Law
  0 siblings, 1 reply; 7+ messages in thread
From: H.J. Lu @ 1998-05-07 21:59 UTC (permalink / raw)
  To: Andrew Macleod; +Cc: egcs

> 
> 
> >> BTW, is_java_type () is not declared anywhere.
> >> 
> 
> It should be defined on line 1142 of method.c:
> 

But there is no prototype for is_java_type.


H.J.

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

* Re: No prototype for is_java_type
  1998-05-07 21:59 ` No prototype for is_java_type H.J. Lu
@ 1998-05-07 23:40   ` Jeffrey A Law
  1998-05-08  7:55     ` H.J. Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Jeffrey A Law @ 1998-05-07 23:40 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Andrew Macleod, egcs

  In message < m0yXfFm-000268C@ocean.lucon.org >you write:
  > > 
  > > 
  > > >> BTW, is_java_type () is not declared anywhere.
  > > >> 
  > > 
  > > It should be defined on line 1142 of method.c:
  > > 
  > 
  > But there is no prototype for is_java_type.
There are lots of prototypes missing.  Why don't you submit a patch
to fix some of them?

And please, don't resubmit the "mega patch" you did 8 months ago :-)

jeff

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

* Re: No prototype for is_java_type
  1998-05-07 23:40   ` Jeffrey A Law
@ 1998-05-08  7:55     ` H.J. Lu
  1998-05-08  9:29       ` Jeffrey A Law
  0 siblings, 1 reply; 7+ messages in thread
From: H.J. Lu @ 1998-05-08  7:55 UTC (permalink / raw)
  To: law; +Cc: egcs

> There are lots of prototypes missing.  Why don't you submit a patch
> to fix some of them?
> 
> And please, don't resubmit the "mega patch" you did 8 months ago :-)
> 

Yes, I do have many prototype patches. Yes, I can send them one by
one. But I am not sure anyone has time to look at them. I don't want
to waste my time again. If anyone is interested in my prototype
patches, please let me know.

-- 
H.J. Lu (hjl@gnu.org)

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

* Re: No prototype for is_java_type
  1998-05-08  9:29       ` Jeffrey A Law
@ 1998-05-08  9:29         ` H.J. Lu
  1998-05-10  2:05           ` Jeffrey A Law
  0 siblings, 1 reply; 7+ messages in thread
From: H.J. Lu @ 1998-05-08  9:29 UTC (permalink / raw)
  To: law; +Cc: egcs

> If you'd take a look the one patch that you "un-megaized" did go in after
> I fixed several problems with it (rtl.h prototyping).
> 

Before I send in many patches, what about the format of prototype?
I have seen many different ones for the new prototypes:

extern int foo PROTO((void));
extern int foo PROTO ((void));
extern int foo		PROTO ((void));
extern int foo		PROTO((void));

Does that mean any of above is ok now?

-- 
H.J. Lu (hjl@gnu.org)

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

* Re: No prototype for is_java_type
  1998-05-08  7:55     ` H.J. Lu
@ 1998-05-08  9:29       ` Jeffrey A Law
  1998-05-08  9:29         ` H.J. Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Jeffrey A Law @ 1998-05-08  9:29 UTC (permalink / raw)
  To: H.J. Lu; +Cc: egcs

  In message < m0yXoYo-000268C@ocean.lucon.org >you write:
  > > There are lots of prototypes missing.  Why don't you submit a patch
  > > to fix some of them?
  > > 
  > > And please, don't resubmit the "mega patch" you did 8 months ago :-)
  > > 
  > 
  > Yes, I do have many prototype patches. Yes, I can send them one by
  > one. But I am not sure anyone has time to look at them. I don't want
  > to waste my time again. If anyone is interested in my prototype
  > patches, please let me know.
If you'd take a look the one patch that you "un-megaized" did go in after
I fixed several problems with it (rtl.h prototyping).

jeff

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

* Re: No prototype for is_java_type
  1998-05-08  9:29         ` H.J. Lu
@ 1998-05-10  2:05           ` Jeffrey A Law
  0 siblings, 0 replies; 7+ messages in thread
From: Jeffrey A Law @ 1998-05-10  2:05 UTC (permalink / raw)
  To: H.J. Lu; +Cc: egcs

  In message < m0yXq1l-000268C@ocean.lucon.org >you write:
  > > If you'd take a look the one patch that you "un-megaized" did go in after
  > > I fixed several problems with it (rtl.h prototyping).
  > > 
  > 
  > Before I send in many patches, what about the format of prototype?
  > I have seen many different ones for the new prototypes:
  > 
  > extern int foo PROTO((void));
  > extern int foo PROTO ((void));
  > extern int foo		PROTO ((void));
  > extern int foo		PROTO((void));
Either the second or third is the preferred format.  I personally
prefer the 3rd since it makes it much easier to read (IMHO).

It is also acceptable to format a prototype in a format identical to
those around it.  This is strictly a readability issue -- it does
not make much sense to have 20 consecutive prototypes of one format,
then one outlier of a different format.


jeff

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

end of thread, other threads:[~1998-05-10  2:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-07 17:39 A patch for g++ Andrew Macleod
1998-05-07 21:59 ` No prototype for is_java_type H.J. Lu
1998-05-07 23:40   ` Jeffrey A Law
1998-05-08  7:55     ` H.J. Lu
1998-05-08  9:29       ` Jeffrey A Law
1998-05-08  9:29         ` H.J. Lu
1998-05-10  2:05           ` Jeffrey A Law

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).