public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26117] New: #EXE#2_1.cpp#Error of executing
@ 2006-02-06 9:01 aplatovsky at mail dot ru
2006-02-06 10:04 ` [Bug c++/26117] " falk at debian dot org
2006-02-06 14:41 ` aplatovsky at mail dot ru
0 siblings, 2 replies; 3+ messages in thread
From: aplatovsky at mail dot ru @ 2006-02-06 9:01 UTC (permalink / raw)
To: gcc-bugs
gcc -o test.bin 2_1.cpp -w
test.bin
echo 127
127
Function main() must return 383, but return 127
cat 2_1.cpp
int main(){
unsigned x = 255, smallest, ripple, ones;
smallest = x & -x;
ripple = x + smallest;
ones = x ^ ripple;
ones = (ones >> 2) / smallest;
return ripple | ones;
}
--
Summary: #EXE#2_1.cpp#Error of executing
Product: gcc
Version: 2.95.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aplatovsky at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26117
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/26117] #EXE#2_1.cpp#Error of executing
2006-02-06 9:01 [Bug c++/26117] New: #EXE#2_1.cpp#Error of executing aplatovsky at mail dot ru
@ 2006-02-06 10:04 ` falk at debian dot org
2006-02-06 14:41 ` aplatovsky at mail dot ru
1 sibling, 0 replies; 3+ messages in thread
From: falk at debian dot org @ 2006-02-06 10:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from falk at debian dot org 2006-02-06 10:04 -------
The return value of main() is interpreted in an implementation-defined way by
the
OS. Your OS (which you failed to mention) probably crops it to 7 bit. So this
is
not a gcc bug.
--
falk at debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26117
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/26117] #EXE#2_1.cpp#Error of executing
2006-02-06 9:01 [Bug c++/26117] New: #EXE#2_1.cpp#Error of executing aplatovsky at mail dot ru
2006-02-06 10:04 ` [Bug c++/26117] " falk at debian dot org
@ 2006-02-06 14:41 ` aplatovsky at mail dot ru
1 sibling, 0 replies; 3+ messages in thread
From: aplatovsky at mail dot ru @ 2006-02-06 14:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from aplatovsky at mail dot ru 2006-02-06 14:41 -------
.
--
aplatovsky at mail dot ru changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |VERIFIED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26117
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-02-06 14:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-06 9:01 [Bug c++/26117] New: #EXE#2_1.cpp#Error of executing aplatovsky at mail dot ru
2006-02-06 10:04 ` [Bug c++/26117] " falk at debian dot org
2006-02-06 14:41 ` aplatovsky at mail dot ru
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).