Issue Details (XML | Word | Printable)

Key: PCC-285
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

#pragma pack conflicting with __attribute__((packed))

Created: 23/Mar/11 11:39 PM   Updated: 27/Mar/11 09:13 PM
Component/s: Common code
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386


 Description  « Hide
The following code fragment

#pragma pack(1)

struct foo {
        int a;
} __attribute__ ((__packed__));

when compiled with "pcc -c" fails with

line 5: compiler error: strmemb

(I don't know which ought to take precedence, arguably a bug in the code?)

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 27/Mar/11 09:12 PM
Fixed now, thanks.

Anders Magnusson added a comment - 27/Mar/11 09:13 PM
The last one wins. But the bug was that #pragma pack couldn't be combined with any attributes.