Debian Codegraph @

gcc/testsuite/gcc.dg/sso-19.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-std=c23" } */
3 /* PR c/104822 */
4
5 #include <stddef.h>
6
7 struct Sb {
8 int i;
9 } __attribute__((scalar_storage_order("big-endian")));
10 struct Sl {
11 int i;
12 } __attribute__((scalar_storage_order("little-endian")));
13
14 /* Neither of these should warn about incompatible scalar storage order
15 as NULL pointers are compatiable with both endian. */
16 struct Sb *pb = nullptr; /* { dg-bogus "" } */
17 struct Sl *pl = nullptr; /* { dg-bogus "" } */