From owner-freebsd-questions Wed Jan 18 10:14:36 1995 Return-Path: questions-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id KAA10707 for questions-outgoing; Wed, 18 Jan 1995 10:14:36 -0800 Received: from kithrup.com (kithrup.com [140.174.23.40]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id KAA10700; Wed, 18 Jan 1995 10:14:33 -0800 Received: (from sef@localhost) by kithrup.com (8.6.8/8.6.6) id KAA24727; Wed, 18 Jan 1995 10:14:19 -0800 Date: Wed, 18 Jan 1995 10:14:19 -0800 From: Sean Eric Fagan Message-Id: <199501181814.KAA24727@kithrup.com> To: freebsd-current@freefall.cdrom.com, freebsd-questions@freefall.cdrom.com, ugen@netvision.net.il Subject: Re: GCC bug again... Sender: questions-owner@FreeBSD.org Precedence: bulk Ah ah. I see what he's saying. I compiled: extern long long lseek (int, long long, int); char buf[1023]; int fd; foo() { lseek (fd, -sizeof(buf), 1); } with 'gcc -S' on a 1.1++ system, and this was the output: .file "t.c" gcc2_compiled.: ___gnu_compiled_c: .text .align 2 .globl _foo .type _foo,@function _foo: pushl %ebp movl %esp,%ebp pushl $1 pushl $0 # <--- should be -1 pushl $-1023 pushl _fd call _lseek addl $16,%esp L1: leave ret Lfe1: .size _foo,Lfe1-_foo .comm _buf,1024 .comm _fd,4 If the second argument is cast to '(int)', then it Does The Right Thing. gcc-2.6.0 seems to do this, as well, so it is confused about *something*. Sean.