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]
Other format: [Raw text]

c/5025: gcc bug - read() and fread() treats carriage return to have hex value of 0x0A



>Number:         5025
>Category:       c
>Synopsis:       gcc bug - read() and fread() treats carriage return to have hex value of 0x0A
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 05 17:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Shrinivas Samant
>Release:        gcc 2.7.2.3
>Organization:
>Environment:
Sun
>Description:
I create a file called 'input' letter 'a' and carriage return and line feed. When I do a checksum on this file, i get a result of 61+0A+0A = 0x75. But the expected answer is 0x61+0x0D+0x0A = 0x78. 
Why is the read() function treating a carriage return as 0x0a?
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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