This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/2305: Binary IO read problem



>Number:         2305
>Category:       c++
>Synopsis:       Binary IO read problem
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 16 09:36:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Joris Esch
>Release:        2.96
>Organization:
>Environment:
RedHat 7.0
gcc-c++-2.96-69.i386.rpm
>Description:
Reading from a binary file using read does not work.
Behaviour is correct on version 2.95 on aix, not on 2.96.
It seems the order in which bytes are read is messed up/reversed..
>How-To-Repeat:
create hex file with contents: 01 11 
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="main.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="main.cpp"

I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGZzdHJlYW0+CiNpbmNsdWRlPGlvbWFuaXA+Cgp2
b2lkIG1haW4oKSB7CiAgaWZzdHJlYW0gdGVzdGJpbjsKICAvL3Rlc3RiaW4ub3BlbigidGVzdC5i
aW4iLCBpb3NfYmFzZTo6YmluYXJ5KTsgLy8gZG9lcyBub3Qgd29yawogIHRlc3RiaW4ub3Blbigi
dGVzdC5iaW4iKTsKCiAgc2hvcnQgc2hvcnREdW1teTsKICB0ZXN0YmluLnJlYWQoJnNob3J0RHVt
bXksIHNpemVvZihzaG9ydER1bW15KSk7CiAgY2VyciA8PCBzaG9ydER1bW15IDw8ICIgc2hvdWxk
IGJlIDI3MyIgPDwgZW5kbDsKfQo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]