문제

I've to use #pragma pack(pop,1) in GCC, but when I compile I receive this warning:

malformed ‘#pragma pack(pop[, id])’ - ignored

Can anybody tell me if this is a good fix:

#pragma pack(pop)
#pragma pack(1)

Thank you very much :)

도움이 되었습니까?

해결책

Why would you want to use #pragma pack(pop, 1)? What would that mean?

The normal use case is something like:

#pragma pack(push, 1) // save current pack setting and set to 1

...

#pragma pack(pop)     // return to previous pack setting
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top