Rollup merge of #135552 - amy-kwan:amy-kwan/reprc-struct-diagnostic-power-alignment, r=workingjubilee
[AIX] Lint on structs that have a different alignment in AIX's C ABI This PR adds a linting diagnostic on AIX for repr(C) structs that are required to follow the power alignment rule. A repr(C) struct needs to follow the power alignment rule if the struct: - Has a floating-point data type (greater than 4-bytes) as its first member, or - The first member of the struct is an aggregate, whose recursively first member is a floating-point data type (greater than 4-bytes). The power alignment rule for eligible structs is currently unimplemented, so a linting diagnostic is produced when such a struct is encountered.
This commit is contained in:
commit
9b40bd70de
7 changed files with 411 additions and 16 deletions
|
@ -1694,6 +1694,10 @@ pub(crate) struct OverflowingLiteral<'a> {
|
|||
pub lit: String,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_uses_power_alignment)]
|
||||
pub(crate) struct UsesPowerAlignment;
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_unused_comparisons)]
|
||||
pub(crate) struct UnusedComparisons;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue