This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/1552: CR-LF not handled correctly when using #pragma pack
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/1552: CR-LF not handled correctly when using #pragma pack
- From: bruce at go-mol dot com
- Date: 4 Jan 2001 21:25:13 -0000
- Cc: bruce at go-mol dot com
- Reply-To: bruce at go-mol dot com
>Number: 1552
>Category: c
>Synopsis: CR-LF not handled correctly when using #pragma pack
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 04 13:26:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Bruce Riggins
>Release: gcc 2.95.2 19991024
>Organization:
>Environment:
Redhat Linux 6.2
>Description:
When DOS format (EOL=CR-LF) files are compiled on the Linux system, random errors are created if there are lines with:
#pragma pack(x)
>How-To-Repeat:
// Compile this, with the file in DOS format (CR-LF, not
// just LF).
// It compiles fine with just LF, but not with CR-LF.
#pragma pack(4)
int main()
{
return 0;
}
>Fix:
The correction is to get rid of the CR characters. But it would be nice if the parser did that for us. :)
>Release-Note:
>Audit-Trail:
>Unformatted: