c/1552: CR-LF not handled correctly when using #pragma pack
bruce@go-mol.com
bruce@go-mol.com
Thu Jan 4 13:26:00 GMT 2001
>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:
More information about the Gcc-bugs
mailing list