From owner-freebsd-hackers Wed May 29 09:13:22 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA14258 for hackers-outgoing; Wed, 29 May 1996 09:13:22 -0700 (PDT) Received: from ki.net (root@ki.net [205.150.102.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA14248; Wed, 29 May 1996 09:13:17 -0700 (PDT) Received: from localhost (scrappy@localhost) by ki.net (8.7.5/8.7.5) with SMTP id MAA07446; Wed, 29 May 1996 12:13:14 -0400 (EDT) Date: Wed, 29 May 1996 12:13:13 -0400 (EDT) From: "Marc G. Fournier" To: Greg Lehey cc: Gary Palmer , hackers@FreeBSD.org Subject: Re: I HATE OPTIMISING COMPILERS In-Reply-To: <199605291108.NAA20309@allegro.lemis.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Wed, 29 May 1996, Greg Lehey wrote: > Gary Palmer writes: > > > > Well, I certainly do at the minute. > > > > Take the following innocuous piece of code: > > > > if (pdu->version == SNMP_DEFAULT_VERSION) > > pdu->version = session->version; > > > > if (pdu->version == SNMP_DEFAULT_VERSION){ > > fprintf(stderr, "No version specified\n"); > > snmp_errno = SNMPERR_BAD_ADDRESS; > > return 0; > >} > > > > (etc). > > Well, it looks like what you hate is a broken compiler. That's not > optimizing, that's just broken. > > How come you didn't use gdb to follow up the problem? > How do you follow up a problem like this with gdb? I hadn't even thought about an optimizing problem when I started to try to debug this with gdb, but I couldn't find a thing that seemed to indicate whree the problem lay ... Marc G. Fournier scrappy@ki.net Systems Administrator @ ki.net scrappy@freebsd.org