Module Name: src
Committed By: rillig
Date: Wed May 1 07:43:42 UTC 2024
Modified Files:
src/sys/sys: cdefs.h
Log Message:
sys/cdefs.h: pass __aligned to lint
Lint could parse _Alignas and __attribute__((__aligned__(4))) previously
but simply ignored them. Since today, they affect the layout of struct
and union.
To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/sys/cdefs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.160 src/sys/sys/cdefs.h:1.161
--- src/sys/sys/cdefs.h:1.160 Sun Apr 30 08:45:48 2023
+++ src/sys/sys/cdefs.h Wed May 1 07:43:41 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: cdefs.h,v 1.160 2023/04/30 08:45:48 riastradh Exp $ */
+/* $NetBSD: cdefs.h,v 1.161 2024/05/01 07:43:41 rillig Exp $ */
/* * Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -451,7 +451,7 @@
#if defined(__lint__)
#define __thread /* delete */
#define __packed __packed
-#define __aligned(x) /* delete */
+#define __aligned(x) _Alignas((x))
#define __section(x) /* delete */
#elif __GNUC_PREREQ__(2, 7) || defined(__PCC__) || defined(__lint__)
#define __packed __attribute__((__packed__))