Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 May 1995 00:40:01 -0700
From:      "Jordan K. Hubbard" <jkh@morton.cdrom.com>
To:        freebsd-bugs
Subject:   gnu/373: gcc generates a fairly misleading error message
Message-ID:  <199505010740.AAA16320@freefall.cdrom.com>
In-Reply-To: Your message of Mon, 1 May 1995 00:36:11 -0700 <199505010736.AAA09013@morton.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help

>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:





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505010740.AAA16320>