public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/8604: <integer>-1 evaluates wrong or causes compiler error
@ 2002-11-22  8:55 paolo
  0 siblings, 0 replies; 2+ messages in thread
From: paolo @ 2002-11-22  8:55 UTC (permalink / raw)
  To: flemming.e, fls, gcc-bugs, gcc-prs, nobody

Synopsis: <integer>-1 evaluates wrong or causes compiler error

State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Sat Nov 16 03:22:30 2002
State-Changed-Why:
    Exact duplicate, without the attachment, of c/8605.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8604


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c/8604: <integer>-1 evaluates wrong or causes compiler error
@ 2002-11-22  8:17 flemming.e
  0 siblings, 0 replies; 2+ messages in thread
From: flemming.e @ 2002-11-22  8:17 UTC (permalink / raw)
  To: gcc-gnats; +Cc: fls


>Number:         8604
>Category:       c
>Synopsis:       <integer>-1 evaluates wrong or causes compiler error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 16 02:36:03 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Flemming Nyboe
>Release:        3.2
>Organization:
>Environment:
Windows ME
Executing GCC from ConTEXT, but DOS prompt execution gives same error.
>Description:
I'm getting an ICE on line 253 in main() "b=b-1". "b--" gives the same error. If I change that line to "b=b+1" I get no error.

Further, look at GC2.c line 193.
The expression "((LCDint == 0) && (i+1 >= digs))" evaluates correctly. If I write "((LCDint == 0) && (i >= (digs-1)))" it doesn't. The term "(i >= (digs-1)))" always eveluates to false.
>How-To-Repeat:
Hope you get the same when you compile my code.
>Fix:
As described in "Description", rearranging terms seem to help. I wonder if there's a special problem with a "-" sign right after an integer variable
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-16 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-22  8:55 c/8604: <integer>-1 evaluates wrong or causes compiler error paolo
  -- strict thread matches above, loose matches on Subject: below --
2002-11-22  8:17 flemming.e

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).