## 6.5 Declarations

[syntax] (declare DECLSPEC ...)
  Process declaration specifiers. Declarations always override any command-line settings. Declarations are valid for the whole compilation-unit (source file), the position of the declaration in the source file can be arbitrary. `DECLSPEC` may be any of the following:

  [declaration specifier] (always-bound SYMBOL ...)
    Declares that the given variables are always bound and accesses to those have not to be checked.

  [declaration specifier] (block)
    Assume global variables are never redefined. This is the same as specifying the `-block` option.

  [declaration specifier] (block-global SYMBOL ...)
  [declaration specifier] (hide SYMBOL ...)
    Declares that the toplevel bindings for `SYMBOL ...` should not be accessible from code in other compilation units or by `eval`. Access to toplevel bindings declared as block global is also more efficient.

  [declaration specifier] (bound-to-procedure SYMBOL ...)
    Declares that the given identifiers are always bound to procedure values.

  [declaration specifier] (compile-time-macros-only)
    Equivalent to the compiler option of the same name - low-level macros defined in the compiled code are not made available at runtime.

  [declaration specifier] (compress-literals [THRESHOLD [INITIALIZER
    ])] The same as the `-compress-literals` compiler option. The threshold argument defaults to 50. If the optional argument `INITIALIZER` is given, then the literals will not be created at module startup, but when the procedure with this name will be called.

  [declaration specifier] (foreign-declare STRING ...)
    Include given strings verbatim into header of generated file.

  [declaration specifier] (interrupts-enabled)
    Enable timer-interrupts checks in the compiled program (the default).

  [declaration specifier] (disable-interrupts)
  [declaration specifier] (not interrupts-enabled)
    Disable timer-interrupts checks in the compiled program. Threads can not be preempted in main- or library-units that contain this declaration.

  [declaration specifier] (no-argc-checks)
    Disables argument count checking.

  [declaration specifier] (no-bound-checks)
    Disables the bound-checking of toplevel bindings.

  [declaration specifier] (no-procedure-checks)
    Disables checking of values in operator position for being of procedure type.

  [declaration specifier] (no-winding-callcc)
    Declares that all known uses of `call-with-current-continuation` use non-winding semantics. So any invocation of captured continuations will not execute any pending before- or after-thunks. This means that the following forms should be used with care, since they expand into or call `dynamic-wind`:

        critical-section
        dynamic-wind
        fluid-let
        with-exception-handler
        handle-exceptions
        condition-case

  [declaration specifier] ([number-type
    TYPE)]
  [declaration specifier] (fixnum-arithmetic)
    Declares that only numbers of the given type are used. `TYPE` may be `fixnum` or `generic` (which is the default).

  [declaration specifier] ([not] standard-bindings SYMBOL ...)
    Declares that all given standard procedures (or all if no symbols are specified) are never globally redefined. If `not` is specified, then all but the given standard bindings are assumed to be never redefined.

  [declaration specifier] ([not] extended-bindings SYMBOL ...)
    Declares that all given non-standard and CHICKEN-specific procedures (or all if no symbols are specified) are never globally redefined. If `not` is specified, then all but the given extended bindings are assumed to be never redefined.

  [declaration specifier] ([not] usual-integrations SYMBOL ...)
    Declares that all given standard and extended bindings (or all if no symbols are specified) are never globally redefined. If `not` is specified, then all but the given standard and extended bindings are assumed to be never redefined.

  [declaration specifier] (unit SYMBOL)
    Specify compilation unit-name (if this is a library)

  [declaration specifier] (unsafe)
  [declaration specifier] (not safe)
    Do not generate safety-checks. This is the same as specifying the `-unsafe` option. Also implies

        (declare (no-bound-checks) (no-procedure-checks) (no-argc-checks))

  [declaration specifier] (uses SYMBOL ...)
    Gives a list of used library-units. Before the toplevel-expressions of the main-module are executed, all used units evaluate their toplevel-expressions in the order in which they appear in this declaration. If a library unit A uses another unit B, then B's toplevel expressions are evaluated before A's. Furthermore, the used symbols are registered as features during compile-time, so `cond-expand` knows about them.