From owner-freebsd-bugs Mon May 1 00:40:02 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id AAA16327 for bugs-outgoing; Mon, 1 May 1995 00:40:02 -0700 Received: (from gnats@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id AAA16320 ; Mon, 1 May 1995 00:40:01 -0700 Date: Mon, 1 May 1995 00:40:01 -0700 Message-Id: <199505010740.AAA16320@freefall.cdrom.com> From: "Jordan K. Hubbard" Reply-To: "Jordan K. Hubbard" To: freebsd-bugs Subject: gnu/373: gcc generates a fairly misleading error message In-Reply-To: Your message of Mon, 1 May 1995 00:36:11 -0700 <199505010736.AAA09013@morton.cdrom.com> Sender: bugs-owner@FreeBSD.org Precedence: bulk >Number: 373 >Category: gnu >Synopsis: In response to admittedly bogus code, gcc emits an odd message >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs (FreeBSD bugs mailing list) >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 1 00:40:01 1995 >Originator: Jordan K. Hubbard >Organization: WC >Release: FreeBSD 2.1.0-Development i386 >Environment: FreeBSD-current >Description: Given the following bad code: struct foo { int fnord; }; int main() { struct foo bar[10]; struct foo *foop; for (foop = bar; *foop; foop++); return 0; } gcc emits this error: root@morton-> cc -c -Wall foo.c foo.c: In function `main': foo.c:11: invalid operands to binary != `!='? Sounds more like a bogus dereference, to me! >How-To-Repeat: See above >Fix: >Audit-Trail: >Unformatted: