This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/5025: gcc bug - read() and fread() treats carriage return to have hex value of 0x0A
- From: ssamant at lucent dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 6 Dec 2001 01:32:31 -0000
- Subject: c/5025: gcc bug - read() and fread() treats carriage return to have hex value of 0x0A
- Reply-to: ssamant at lucent dot com
>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: