Skip to content

Glossary: Swift Beyond the Basics

freestanding macro

Also written: freestanding macros, #warning, #error

A macro written with `#` that stands on its own where an expression or statement could go, such as `#expect`, `#warning` (compiler warning, program still runs) or `#error` (stops the build).

Where the book teaches it

Related terms

macroattached macro