Files
2025-10-25 03:02:53 +03:00

33 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[cpp.scope]
# 15 Preprocessing directives [[cpp]](./#cpp)
## 15.7 Macro replacement [[cpp.replace]](cpp.replace#cpp.scope)
### 15.7.6 Scope of macro definitions [cpp.scope]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/preprocessor.tex#L2040)
A macro definition lasts
(independent of block structure)
until a corresponding#undef directive is encountered or
(if none is encountered)
until the end of the translation unit[.](#1.sentence-1)
Macro definitions have no significance after translation phase 4[.](#1.sentence-2)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/preprocessor.tex#L2050)
A preprocessing directive of the form
# undef [*identifier*](lex.name#nt:identifier "5.11Identifiers[lex.name]") [*new-line*](cpp.pre#nt:new-line "15.1Preamble[cpp.pre]")
causes the specified identifier no longer to be defined as a macro name[.](#2.sentence-1)
It is ignored if the specified identifier is not currently defined as
a macro name[.](#2.sentence-2)