Module Name: src Committed By: riastradh Date: Sun Apr 30 08:45:48 UTC 2023
Modified Files: src/sys/sys: cdefs.h Log Message: sys/cdefs.h: New __MACROUSE for macros to type-check arguments. This way, if there's a macro F(x) with a conditional definition -- e.g., conditional on DIAGNOSTIC or KDTRACE_HOOKS -- it can do __MACROUSE(x) in the definition that's supposed to compile away, without triggering `variable set but not used' errors, while still catching type errors in the expression x. But there's no cost or side effects incurred in the generated code because the value is not computed. This should be the same as __USE, but I haven't figured out how to make it work for both bit fields (which are likely to appear in macro arguments) and aggregates (structs/unions, which are likely to appear as variable declarations), so for now we use two separate macros. To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.