public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* BUGFIX for C++ in egcs-970828
@ 1997-09-02  3:16 Marcin Dalecki
  0 siblings, 0 replies; 2+ messages in thread
From: Marcin Dalecki @ 1997-09-02  3:16 UTC (permalink / raw)
  To: egcs

It speaks for itself:

diff -urN egcs-970828/gcc/cp/ChangeLog egcs-970828-fixed/gcc/cp/ChangeLog
--- egcs-970828/gcc/cp/ChangeLog	Sun Aug 31 17:37:44 1997
+++ egcs-970828-fixed/gcc/cp/ChangeLog	Tue Sep  2 03:12:36 1997
@@ -1,3 +1,17 @@
+Tue Sep  2 03:09:35 1997  Marcin Dalecki (dalecki@sub994.sub.uni-goettingen.de)
+
+    	* mathod.c (build_opfncall): Don't call build_new_op in case of 
+    	MODIFY_EXPR even in ansi overloading rules are specified. This fixes 
+    	the compilation of the follwing code snipplet:
+    	    struct {
+	      int bit1:7;
+	    } b;
+	    enum { val1 = 0x0f };
+	    void buddy (void)
+	    {
+	      b.bit1 |=  val1;
+	    }
+
 Wed Aug 27 02:03:34 1997  Jeffrey A Law  (law@cygnus.com)
 
 	* typeck.c (expand_target_expr): Make definition match declaration.
diff -urN egcs-970828/gcc/cp/method.c egcs-970828-fixed/gcc/cp/method.c
--- egcs-970828/gcc/cp/method.c	Mon Aug 25 17:33:21 1997
+++ egcs-970828-fixed/gcc/cp/method.c	Tue Sep  2 03:00:31 1997
@@ -1247,7 +1247,23 @@
   int try_second;
   int binary_is_unary;
 
-  if (flag_ansi_overloading)
+  /*
+   * Tue Sep  2 02:52:41 MET DST 1997 Marcin Dalecki:
+   * Since I don't understand the code here compleatly I was just trying
+   * to be as most nonintrusive as possible and just excluded the "code"
+   * value case, which will obviously handled wrongly for the following
+   * sample code:
+   * 
+   *       struct { int bit1:7;} b;
+   *       enum { val1 = 0x0f };
+   *       void buddy (void) { b.bit1 |=  val1; }
+   *
+   * Anybody who understand the new code in build_new_op() PLEASE FIX THIS
+   * error SOON, since it prevents QT-1.2 from beeing compiled correctly!
+   * Just a hint: The problem is that build_new_op doesn't get the cast
+   * from enum to int in case of this bitfield right.
+   */
+  if (flag_ansi_overloading && (code != MODIFY_EXPR))
     return build_new_op (code, flags, xarg1, xarg2, arg3);
 
   if (xarg1 == error_mark_node)


Since I'm not on this mailing list myself anymore please send all
replays/comments directly to me.

				Marcin
====================================================================
Langunages: Polish, German, English (in THAT order of precedence).
Homepage: http://sub994.sub.uni-goettingen.de
	  http://sub994.sub.uni-goettingen.de/polish.html


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

* Re: BUGFIX for C++ in egcs-970828
       [not found] <Pine.LNX.3.96.970902074543.28375B-100000.cygnus.egcs@sub994.sub.uni-goettingen.de>
@ 1997-09-02 11:58 ` Jason Merrill
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Merrill @ 1997-09-02 11:58 UTC (permalink / raw)
  To: egcs; +Cc: Marcin Dalecki

Two things:

Please include ChangeLog entries as text, not as a patch; chances are it
won't apply.

Turning off overloading is not a reasonable fix for this bug, since it
breaks other valid code; the proper fix is to avoid building up a reference
when a builtin candidate is chosen.  This will be fixed in the next
snapshot.

Jason

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

end of thread, other threads:[~1997-09-02 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-02  3:16 BUGFIX for C++ in egcs-970828 Marcin Dalecki
     [not found] <Pine.LNX.3.96.970902074543.28375B-100000.cygnus.egcs@sub994.sub.uni-goettingen.de>
1997-09-02 11:58 ` Jason Merrill

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