public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17705] New: Testing a bool using true doesn't work
@ 2004-09-27 22:35 bliss1940-bbs at yahoo dot com
2004-09-27 22:37 ` [Bug c++/17705] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bliss1940-bbs at yahoo dot com @ 2004-09-27 22:35 UTC (permalink / raw)
To: gcc-bugs
bool fred = true;
if(fred == true) {
int something = 2; // never gets here
}
The problem is the expression (fred == true) evaluates as false.
This seems to occur only with avr-gcc. Linux gcc works as expected.
To further examine this you can add this code:
int fredValue = fred;
int trueValue = true:
I find that fred = 0x0001 and true = 0xffff.
--
Summary: Testing a bool using true doesn't work
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bliss1940-bbs at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: gcc 3.4.1
GCC host triplet: mingw32
GCC target triplet: avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17705
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/17705] Testing a bool using true doesn't work
2004-09-27 22:35 [Bug c++/17705] New: Testing a bool using true doesn't work bliss1940-bbs at yahoo dot com
@ 2004-09-27 22:37 ` pinskia at gcc dot gnu dot org
2004-09-27 22:38 ` [Bug target/17705] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-27 22:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-27 22:37 -------
Could attach the preprocessed source?
--
What |Removed |Added
----------------------------------------------------------------------------
Version|unknown |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17705
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/17705] Testing a bool using true doesn't work
2004-09-27 22:35 [Bug c++/17705] New: Testing a bool using true doesn't work bliss1940-bbs at yahoo dot com
2004-09-27 22:37 ` [Bug c++/17705] " pinskia at gcc dot gnu dot org
@ 2004-09-27 22:38 ` pinskia at gcc dot gnu dot org
2004-09-28 2:06 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-27 22:38 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |target
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17705
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/17705] Testing a bool using true doesn't work
2004-09-27 22:35 [Bug c++/17705] New: Testing a bool using true doesn't work bliss1940-bbs at yahoo dot com
2004-09-27 22:37 ` [Bug c++/17705] " pinskia at gcc dot gnu dot org
2004-09-27 22:38 ` [Bug target/17705] " pinskia at gcc dot gnu dot org
@ 2004-09-28 2:06 ` pinskia at gcc dot gnu dot org
2004-09-29 3:21 ` bliss1940-bbs at yahoo dot com
2004-09-29 3:25 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-28 2:06 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17705
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/17705] Testing a bool using true doesn't work
2004-09-27 22:35 [Bug c++/17705] New: Testing a bool using true doesn't work bliss1940-bbs at yahoo dot com
` (2 preceding siblings ...)
2004-09-28 2:06 ` pinskia at gcc dot gnu dot org
@ 2004-09-29 3:21 ` bliss1940-bbs at yahoo dot com
2004-09-29 3:25 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: bliss1940-bbs at yahoo dot com @ 2004-09-29 3:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bliss1940-bbs at yahoo dot com 2004-09-29 03:21 -------
(In reply to comment #1)
> Could attach the preprocessed source?
I have discovered that the problem was in my code. The compiler is okay.
Please cancel this bug report.
Steve Bliss
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17705
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/17705] Testing a bool using true doesn't work
2004-09-27 22:35 [Bug c++/17705] New: Testing a bool using true doesn't work bliss1940-bbs at yahoo dot com
` (3 preceding siblings ...)
2004-09-29 3:21 ` bliss1940-bbs at yahoo dot com
@ 2004-09-29 3:25 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-29 3:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-29 03:25 -------
So closing as invalid.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17705
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-09-29 3:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-27 22:35 [Bug c++/17705] New: Testing a bool using true doesn't work bliss1940-bbs at yahoo dot com
2004-09-27 22:37 ` [Bug c++/17705] " pinskia at gcc dot gnu dot org
2004-09-27 22:38 ` [Bug target/17705] " pinskia at gcc dot gnu dot org
2004-09-28 2:06 ` pinskia at gcc dot gnu dot org
2004-09-29 3:21 ` bliss1940-bbs at yahoo dot com
2004-09-29 3:25 ` pinskia at gcc dot gnu dot org
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).