From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 29 15:17:22 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CFDD16A4BF for ; Fri, 29 Aug 2003 15:17:22 -0700 (PDT) Received: from hood.oook.cz (hood.oook.cz [212.27.205.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE77A43FBF for ; Fri, 29 Aug 2003 15:17:20 -0700 (PDT) (envelope-from pav@oook.cz) Received: from hood.oook.cz (localhost.oook.cz [127.0.0.1]) by hood.oook.cz (8.12.9/8.12.9) with ESMTP id h7TMHIXd008442 for ; Sat, 30 Aug 2003 00:17:18 +0200 (CEST) (envelope-from pav@oook.cz) Received: (from pav@localhost) by hood.oook.cz (8.12.9/8.12.9/Submit) id h7TMHIe6008441 for hackers@freebsd.org; Sat, 30 Aug 2003 00:17:18 +0200 (CEST) X-Authentication-Warning: hood.oook.cz: pav set sender to pav@oook.cz using -f From: Pav Lucistnik To: hackers@freebsd.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1062195438.641.18.camel@hood.oook.cz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Sat, 30 Aug 2003 00:17:18 +0200 Subject: gcc weirdness X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 22:17:22 -0000 What am I missing here? Let we have a function called popup(). Inside this function there is this code: list = get_children(ds, x, TYPE_ELEMENT); gdb shows these values: (gdb) print ds $46 = (Type *) 0x1 (gdb) print x $47 = 0x86adb80 So far, everything is fine. Now, let step down one frame in gdb: (gdb) down #5 0x0808b807 in get_children(ds=0x86adb80, node=0x1, tag_type=TYPE_E... In the source, there is a GList* get_children (Type* ds, PtrNode node, enum Types tag_type) { Do you see ds and node values swapped? The program crashes because of this swapping. What is wrong? I use gcc-3.3.1 on today's -CURRENT. -- Pav Lucistnik What do we know about love? Love is like a pear. Pear is sweet and have a specific shape. Try to exactly define the shape of a pear. -- Marigold: 50 Years Of Poetry