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/1552: CR-LF not handled correctly when using #pragma pack



>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:

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