Container Statements ==================== block ----- Start a new namespace. Not allowed in [`macro`](cil_call_macro_statements.md#macro) and [`optional`](cil_container_statements.md#optional) blocks. [`sensitivity`](cil_mls_labeling_statements.md#sensitivity) and [`category`](cil_mls_labeling_statements.md#category) statements are not allowed in [`block`](cil_container_statements.md#block) blocks. Duplicate declarations of a [`block`](cil_container_statements.md#block) in the same namespace will normally cause an error, but inheriting a block into a namespace (with [`blockinherit`](cil_container_statements.md#blockinherit)) that already has a block with the same name will only result in a warning message and not cause an error. The policy from both blocks will end up in the binary policy. This behavior was used in the past to allow a block to be declared so that an [`in-statement`](cil_container_statements.md#in) could be used on it, but now an [`in-statement`](cil_container_statements.md#in) can be specified to occur after inheritance, so this behavior is not necessary (but is still allowed). **Statement definition:** ```secil (block block_id cil_statement ... ) ``` **Where:**
block
The block keyword.
block_id
The namespace identifier.
cil_statement
Zero or more valid CIL statements.
blockabstract
The blockabstract keyword.
template_id
The abstract namespace identifier. This must match the block_id entry.
Zero or more valid CIL statements forming the abstract block.
blockinherit
The blockinherit keyword.
The inherited namespace identifier.
optional
The optional keyword.
optional_id
The optional namespace identifier.
in
The in keyword.
before|after
An optional value that specifies whether to process the [`in`](cil_container_statements.md#in) before or after block inheritance. If no value is specified, then the [`in`](cil_container_statements.md#in) will be processed before block inheritance.
before
after
container_id
A valid block, optional or macro namespace identifier.
macro