mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 13:56:09 +00:00

Given that we have already explicitly stated in the qualifier that the expression is __unaligned, it makes little sense to diagnose that the address of the packed member may not be aligned. Differential Revision: https://reviews.llvm.org/D30884 llvm-svn: 297620
17 lines
250 B
C
17 lines
250 B
C
// RUN: %clang_cc1 -fsyntax-only -fms-extensions -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
typedef
|
|
struct __attribute__((packed)) S1 {
|
|
char c0;
|
|
int x;
|
|
char c1;
|
|
} S1;
|
|
|
|
void bar(__unaligned int *);
|
|
|
|
void foo(__unaligned S1* s1)
|
|
{
|
|
bar(&s1->x);
|
|
}
|