Bug 65037
Summary: | Ambiguous behaviour of __alignof__ built-in operator | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Grigory Zagorodnev <grigory_zagorodnev> |
Component: | gcc3 | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-10-02 20:09:16 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Grigory Zagorodnev
2002-05-16 13:56:35 UTC
This is because of IA-32 ABI which requires aggregate fields bigger than 4 bytes to be only 4 bytes aligned (unless you use -malign-double, which of course breaks the ABI). __alignof__ (double) == 8 is correct, likewise offsetof. __alignof__ (A::d) should probably change, but that's certainly a 3.2 material. __alignof__ has always been documented as the *recommended* alignment for the type. I don't see that this is a bug at all. |